Python 2.7 はサポートが終了しており、2026 年 1 月 31 日に
非推奨になります。非推奨になると、過去に組織のポリシーを使用して以前のランタイムのデプロイを再度有効にしていた場合でも、Python 2.7 アプリケーションをデプロイできなくなります。既存の Python 2.7 アプリケーションは、
非推奨日以降も引き続き実行され、トラフィックを受信します。
サポートされている最新バージョンの Python に移行することをおすすめします。
共有 VPC ネットワークへの接続
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
組織で共有 VPC を使用している場合、サーバーレス VPC アクセスを使用して、App Engine スタンダード環境のサービスを共有 VPC ネットワークに直接接続できます。これにより、スタンダード環境のサービスが、共有 VPC ネットワークのリソース(Compute Engine VM インスタンス、Memorystore インスタンスなど)や、内部 IP アドレスを持つその他のリソースにアクセスできるようになります。
サーバーレス VPC アクセス コネクタには月額料金がかかります。詳細については、サーバーレス VPC アクセスの料金をご覧ください。
組織で共有 VPC を使用していない場合は、VPC ネットワークへの接続をご覧ください。
構成方法の比較
共有 VPC の場合、サーバーレス VPC アクセス コネクタは 2 つの方法で構成できます。ネットワークへのアクセスを必要とするスタンダード環境リソースを含むサービス プロジェクトごとにコネクタを設定するか、ホスト プロジェクトに共有コネクタを設定します。どちらの方法にも利点があります。
サービス プロジェクト
サービス プロジェクトでコネクタを作成するメリットは、次のとおりです。
- 分離: 各コネクタには専用の帯域幅があり、他のサービス プロジェクトでのコネクタの帯域幅の使用による影響を受けません。これは、トラフィックが急増するサービスの場合や、各サービス プロジェクトが他のサービス プロジェクトの使用による影響を受けないようにする必要がある場合に適しています。
- チャージバック: コネクタで発生した料金は、そのコネクタを含むサービス プロジェクトに関連付けられます。これにより、チャージバックが容易になります。
- セキュリティ: 「最小権限の原則」に従うことができます。コネクタには、アクセスする必要がある共有 VPC ネットワーク内のリソースへのアクセス権を付与する必要があります。サービス プロジェクトでコネクタを作成すると、ファイアウォール ルールを使用して、プロジェクト内のサービスがアクセスできるものを制限できます。
- チームの独立性: ホスト プロジェクト管理者への依存が軽減されます。サービス プロジェクトに関連付けられたコネクタをチームで作成して管理できます。Compute Engine セキュリティ管理者ロールや、有効にされたホスト プロジェクトの
compute.firewalls.create
権限を含むカスタム Identity and Access Management(IAM)ロールが付与されたユーザーは、引き続きコネクタのファイアウォール ルールを管理する必要があります。
サービス プロジェクトにコネクタを設定する場合は、サービス プロジェクトでコネクタを構成するをご覧ください。
ホスト プロジェクト
ホスト プロジェクトにコネクタを作成するメリットは、次のとおりです。
- 一元化されたネットワーク管理: ホスト プロジェクトでネットワーク構成リソースを一元化する共有 VPC モデルと連携します。
- IP アドレス空間: より多くの IP アドレス空間を保持します。コネクタは各インスタンスに IP アドレスを必要とするため、コネクタの数が少なくなり(各コネクタのインスタンスも少なくなり)、使用される IP アドレスも少なくなります。これは、IP アドレスの不足が懸念される場合に役立ちます。
- メンテナンス: 作成した各コネクタを複数のサービス プロジェクトで使用できる可能性があるため、メンテナンスの時間を短縮できます。これは、メンテナンスのオーバーヘッドが懸念される場合に役立ちます。
- アイドル時間の費用: コネクタのアイドル時間と関連費用を削減できます。コネクタは、トラフィックを処理していない場合でも料金が発生します(料金を参照)。コネクタの数を少なくすると、コネクタのタイプとインスタンスの数によっては、トラフィックを処理していない場合に支払い対象となるリソースの量を削減できる可能性があります。この方法は、ユースケースに多数のサービスが関わっており、サービスが頻繁には使用されていない場合、費用対効果が高いことがよくあります。
ホスト プロジェクトにコネクタを設定する場合は、ホスト プロジェクトでのコネクタの構成をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は 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\u003eApp Engine standard environment services can connect directly to a Shared VPC network using Serverless VPC Access, enabling access to resources like Compute Engine VM instances and Memorystore instances.\u003c/p\u003e\n"],["\u003cp\u003eServerless VPC Access connectors incur a monthly charge, and they are incompatible with the URL Fetch service, requiring its disablement and discontinuation of the \u003ccode\u003eurlfetch\u003c/code\u003e library.\u003c/p\u003e\n"],["\u003cp\u003eConnectors can be configured either in each service project or in the host project, each with distinct advantages related to isolation, chargebacks, security, team independence, centralized management, IP address space, maintenance, and idle time costs.\u003c/p\u003e\n"],["\u003cp\u003eConfiguring connectors in service projects provides benefits like dedicated bandwidth, easier chargebacks, enhanced security through least privilege, and greater team autonomy, with firewall rule management still required in the host project.\u003c/p\u003e\n"],["\u003cp\u003eSetting up connectors in the host project offers centralized network management, conserves IP address space, reduces maintenance overhead, and can lower idle time costs, especially beneficial for large numbers of infrequently used services.\u003c/p\u003e\n"]]],[],null,["# Connecting to a Shared VPC network\n\nIf your organization uses [Shared VPC](/vpc/docs/shared-vpc), you can\nconnect App Engine standard environment services directly to your Shared VPC network\nby using [Serverless VPC Access](/vpc/docs/serverless-vpc-access).\nThis allows a standard environment service to access resources in your\nShared VPC network, such as Compute Engine VM instances,\nMemorystore instances, and any other resources with an internal IP\naddress.\n\nServerless VPC Access connectors incur a monthly charge. For more information, see Serverless VPC Access\n[pricing](/vpc/pricing#serverless-vpc-pricing).\n\nIf your organization does not use Shared VPC, see\n[Connect to a VPC network](/appengine/docs/legacy/standard/python/connecting-vpc).\n\n\u003cbr /\u003e\n\n| **Note:** Serverless VPC Access is not compatible with the URL Fetch service. To use Serverless VPC Access, [disable the URL Fetch default](/appengine/docs/legacy/standard/python/sockets#making_httplib_use_sockets) and discontinue any explicit use of the [`urlfetch`](/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.urlfetch) library.\n\nComparison of configuration methods\n-----------------------------------\n\nFor Shared VPC, Serverless VPC Access connectors can be\nconfigured in two different ways. You can either set up connectors in each\nservice project that has standard environment resources that need access\nto your network, or you can set up shared connectors in the host project. There\nare advantages to each method. \n\n### Service projects\n\nAdvantages of creating connectors in the service projects:\n\n- **Isolation:** Each connector has dedicated bandwidth and is unaffected by bandwidth use of connectors in other service projects. This is good if you have a service that experiences spikes in traffic, or if you need to ensure that each service project is unaffected by connector use of other service projects.\n- **Chargebacks:** Charges incurred by connectors are associated with the service project containing the connector. This enables easier chargebacks.\n- **Security:** Allows you to follow the \"principle of least privilege.\" Connectors must be granted access to the resources in your Shared VPC network that they need to reach. By creating a connector in the service project, you can limit what the services in the project can access by using firewall rules.\n- **Team independence:** Reduces dependency on the host project administrator. Teams can create and manage the connectors associated with their service project. A user with the Compute Engine [Security Admin](/compute/docs/access/iam#compute.securityAdmin) role or a custom [Identity and Access Management (IAM)](/iam) role with the [`compute.firewalls.create`](/compute/docs/reference/rest/v1/firewalls/insert#iam-permissions) permission enabled for the host project must still manage firewall rules for the connector.\n\nTo set up connectors in service projects, see\n[Configure connectors in service projects](/appengine/docs/legacy/standard/python/shared-vpc-service-projects).\n\n### Host project\n\nAdvantages of creating connectors in the host project:\n\n- **Centralized network management:** Aligns with the Shared VPC model of centralizing network configuration resources in the host project.\n- **IP address space:** Preserves more of your IP address space. Connectors require an IP address for each instance, so having fewer connectors (and fewer instances in each connector) uses fewer IP addresses. This is good if you are concerned about running out of IP addresses.\n- **Maintenance:** Reduces maintenance, because each connector you create may be used by multiple service projects. This is good if you are concerned about maintenance overhead.\n- **Cost for idle time:** Can reduce the amount of connector idle time and associated cost. Connectors incur costs even when they are not serving traffic (see [pricing](/vpc/pricing#serverless-vpc-pricing)). Having fewer connectors may reduce the amount of resource you pay for when not serving traffic, depending on your connector type and number of instances. This is often cost effective if your use case involves a large number of services, and the services are used infrequently.\n\nTo set up connectors in the host project, see\n[Configure connectors in the host project](/appengine/docs/legacy/standard/python/shared-vpc-host-project)."]]