Java 8은 지원이 종료되었으며 2026년 1월 31일에
지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 Java 8 애플리케이션을 배포할 수 없습니다. 기존 Java 8 애플리케이션은
지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다.
지원되는 최신 Java 버전으로 마이그레이션하는 것이 좋습니다.
Cloud Storage 사용하기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
자바 8 앱에서 런타임 중에 파일을 읽고 써야 하는 경우 또는 동영상, 이미지, 기타 정적 콘텐츠와 같은 파일을 제공해야 하는 경우 Cloud Storage 버킷을 사용하는 것이 좋습니다.
앱을 만들면 App Engine이 기본 버킷을 만듭니다. 이 버킷은 처음 5GB의 스토리지를 무료로 제공하며 Cloud Storage I/O 작업의 무료 할당량을 포함합니다. 다른 Cloud Storage 버킷을 만들 수 있지만 기본 버킷에만 처음 5GB의 무료 스토리지가 포함되어 있습니다.
App Engine에 Cloud Storage 사용
App Engine 앱에서 Cloud Storage 버킷을 사용하려면 다음 안내를 따르세요.
App Engine 프로젝트에서 기존 버킷의 이름을 확인합니다. Cloud Storage에서 데이터를 업로드하거나 다운로드할 때 이 이름을 지정합니다.
Cloud Storage 버킷의 이름을 앱에 하드 코딩하지 않고 앱의 환경 변수에 저장하는 것이 좋습니다.
앱에서 라이브러리를 앱의 종속 항목 파일에 추가하여 Cloud Storage를 종속 항목으로 선언합니다.
버킷에서 데이터를 업로드 또는 다운로드하려면 Google Cloud 클라이언트 라이브러리를 사용합니다.
기본 버킷 사용
앱을 만들 때 App Engine이 처음 5GB의 무료 스토리지를 제공하는 기본 버킷을 만듭니다. 기본 버킷에는 Cloud Storage I/O 작업을 위한 무료 할당량도 포함되어 있습니다. 자세한 내용은 가격 책정, 할당량, 한도를 참조하세요. 5GB 제한을 초과하는 스토리지를 사용하면 요금이 청구됩니다.
기본 버킷 이름의 형식은 다음과 같습니다.
project-id.appspot.com
App Engine은 앱의 새 버전을 배포할 때 임시 스토리지에 사용할 버킷도 만듭니다. 이름이 staging.project-id.appspot.com
인 이 버킷은 App Engine에서만 사용됩니다. 앱은 이 버킷과 상호작용할 수 없습니다.
버킷 및 객체 권한 설정
앱과 연결된 서비스 계정에는 프로젝트에서 버킷을 읽고 쓸 수 있는 권한이 필요합니다. 필요한 권한을 알아보려면 Cloud Storage의 IAM 역할을 참조하세요.
일반적으로 앱과 연결된 서비스 계정은 기본 App Engine 서비스 계정입니다.
조직 정책 구성에 따라 프로젝트에 대한 편집자 역할이 기본 서비스 계정에 자동으로 부여될 수 있습니다. iam.automaticIamGrantsForDefaultServiceAccounts
조직 정책 제약조건을 적용하여 자동 역할 부여를 중지하는 것이 좋습니다. 2024년 5월 3일 이후에 조직을 만든 경우 기본적으로 이 제약조건이 적용됩니다.
자동 역할 부여를 중지한 경우 기본 서비스 계정에 부여할 역할을 결정한 후 직접 이러한 역할을 부여해야 합니다.
기본 서비스 계정에 이미 편집자 역할이 있으면 편집자 역할을 권한이 더 낮은 역할로 바꾸는 것이 좋습니다.서비스 계정 역할을 안전하게 수정하려면 정책 시뮬레이터를 사용하여 변경사항의 영향을 확인한 후 적절한 역할을 부여하고 취소합니다.
다른 사용자, 앱, 프로젝트에서 버킷과 해당 콘텐츠에 액세스하도록 허용하는 방법은 버킷 권한 설정 및 객체 권한 설정을 참조하세요.
로컬 개발 서버에서 Cloud Storage 사용
App Engine 로컬 개발 서버는 Cloud Storage를 에뮬레이션하지 않으므로 모든 Cloud Storage 요청은 인터넷을 통해 실제 Cloud Storage 버킷에 전송해야 합니다.
가격 책정, 할당량, 한도
Cloud Storage 클라이언트 라이브러리에서 Cloud Storage를 호출할 때 부과되는 대역폭 요금이 없습니다. 하지만 작업 비용은 청구됩니다.
또한 라이브러리가 Cloud Storage와 상호작용하는 데 URL Fetch 서비스를 사용하므로 호출 수가 URL Fetch 할당량에 반영됩니다.
Cloud Storage는 유료 서비스이며 Cloud Storage 가격표에 따라 비용이 청구됩니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eCloud Storage buckets are recommended for Java 8 App Engine apps that need to read, write, or serve files during runtime.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine provides a default bucket when an app is created, offering 5GB of free storage and a free quota for Cloud Storage I/O operations.\u003c/p\u003e\n"],["\u003cp\u003eTo use Cloud Storage with an App Engine app, you need to declare Cloud Storage as a dependency in your app and use the Google Cloud Client Library to upload or download data.\u003c/p\u003e\n"],["\u003cp\u003eThe default bucket name follows the format \u003ccode\u003eproject-id.appspot.com\u003c/code\u003e, and there is also a temporary staging bucket named \u003ccode\u003estaging.project-id.appspot.com\u003c/code\u003e that App Engine uses during deployments, but cannot be accessed by the application.\u003c/p\u003e\n"],["\u003cp\u003eThe service account associated with your app needs appropriate IAM roles to interact with Cloud Storage buckets, and it's recommended to enforce the organization policy constraint to disable the automatic Editor role grant, in order to grant more specific roles.\u003c/p\u003e\n"]]],[],null,["# Using Cloud Storage\n\nIf your Java 8 app needs to read and write files during runtime,\nor serve files such as movies, images or other static content, we recommend you\nuse a [Cloud Storage](/storage/docs) bucket.\n\nApp Engine creates a [default bucket](#default_bucket) when you create\nan app. This bucket provides the first 5GB of storage for free and includes a\nfree quota for Cloud Storage I/O operations. You can\n[create other Cloud Storage buckets](/storage/docs/creating-buckets),\nbut only the default bucket includes the first 5GB of storage for free.\n\nUsing Cloud Storage with App Engine\n-----------------------------------\n\nTo use a Cloud Storage bucket from an App Engine app:\n\n1. [View the names of the existing buckets](/storage/docs/listing-buckets)\n in your App Engine project. You'll specify these names when you\n upload or download data from Cloud Storage.\n\n We recommend that you store the names of your Cloud Storage buckets\n in your app's [environment variables](/appengine/docs/standard/reference/app-yaml#environment_variables)\n instead of hard coding them into your app.\n2. In your app, declare Cloud Storage as a dependency\n\n by [adding the library to your app's dependencies\n file](/storage/docs/reference/libraries#client-libraries-install-java).\n\n \u003cbr /\u003e\n\n3.\n Use the Google Cloud Client Library to\n [upload](/storage/docs/uploading-objects)\n or [download](/storage/docs/downloading-objects)\n data from your buckets.\n\n\n### Using the default bucket\n\nWhen you create an app, App Engine creates a default bucket that\nprovides the first 5GB of storage for free. The default bucket also includes\na free quota for Cloud Storage I/O operations. See\n[Pricing, quotas, and limits](#pricing_quotas_and_limits) for details. You will\nbe charged for storage over the 5GB limit.\n\nThe name of the default bucket is in the following format: \n\n```\nproject-id.appspot.com\n```\n\n\u003cbr /\u003e\n\nApp Engine also creates a bucket that it uses for temporary\nstorage when it deploys new versions of your app. This bucket, named\n`staging.`\u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e`.appspot.com`, is for use by\nApp Engine only. Apps can't interact with this bucket.\n\n### Setting bucket and object permissions\n\nThe service account that's associated with your app needs permissions to read\nand write to buckets in your project. To learn which permissions are required,\nsee [IAM roles for\nCloud Storage](/storage/docs/access-control/iam-roles).\n\nTypically, the\nservice account that's associated with your app is the [default\nApp Engine service\naccount](/appengine/docs/legacy/standard/java/service-account).\n\n\nDepending on your organization policy configuration, the default service account might\nautomatically be granted the [Editor role](/iam/docs/roles-overview#basic) on your\nproject. We strongly recommend that you disable the automatic role grant by [enforcing the `iam.automaticIamGrantsForDefaultServiceAccounts` organization policy\nconstraint](/resource-manager/docs/organization-policy/restricting-service-accounts#disable_service_account_default_grants). If you created your organization after May 3, 2024, this\nconstraint is enforced by default.\n\n\nIf you disable the automatic role grant, you must decide which roles to grant to the default\nservice accounts, and then [grant these\nroles](/iam/docs/granting-changing-revoking-access) yourself.\n\n\nIf the default service account already has the Editor role, we recommend that you replace the\nEditor role with less permissive roles.To safely modify the service account's roles, use [Policy Simulator](/policy-intelligence/docs/simulate-iam-policies) to see the impact of\nthe change, and then [grant and revoke the\nappropriate roles](/iam/docs/granting-changing-revoking-access).\n\n\u003cbr /\u003e\n\nFor information about allowing other users, apps, or projects to access a bucket\nand its contents, see\n[Setting bucket permissions](/storage/docs/cloud-console#_bucketpermission)\nand\n[Setting object permissions](/storage/docs/cloud-console#_permissions).\n\nUsing Cloud Storage with the local development server\n-----------------------------------------------------\n\nThe App Engine local development server doesn't emulate Cloud Storage,\nso all Cloud Storage requests must be sent over the Internet to an\nactual Cloud Storage bucket.\n\nPricing, quotas, and limits\n---------------------------\n\nThere are no bandwidth charges associated with Cloud Storage client library\ncalls to Cloud Storage. However, there are\n[operations charges](/storage/pricing#operations-pricing).\nIn addition, the calls count against your\n[URL fetch quota](/appengine/docs/quotas#UrlFetch)\nas the library uses the URL Fetch service to interact with Cloud Storage.\n\nNotice that Cloud Storage is a pay-to-use service;\nyou will be charged according to the Cloud Storage\n[price sheet](/storage/pricing)."]]