

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# サービスコントロールポリシーを使用して、アカウントレベルでのインターネットアクセスを防止する
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy"></a>

*Amazon Web Services、Sergiy Shevchenko、Sean O'Sullivan、Victor Mazeo Whitaker*

## 概要
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-summary"></a>

組織は、プライベートのまま維持すべきアカウントリソースに対して、インターネットアクセスを制限したいと考えることがよくあります。これらのアカウントでは、仮想プライベートクラウド (VPC) のリソースは、いかなる方法でもインターネットにアクセスするべきではありません。多くの組織は、[一元化された検査アーキテクチャ](https://aws.amazon.com/blogs/networking-and-content-delivery/centralized-inspection-architecture-with-aws-gateway-load-balancer-and-aws-transit-gateway/)を選択します。一元的な検査アーキテクチャの東西 (VPC–to–VPC) トラフィックに対しては、確実にスポークアカウントとそのリソースがインターネットにアクセスできないようにする必要があります。南北 (インターネット出力とオンプレミス) トラフィックの場合、検査 VPC を介してのみインターネットアクセスを許可する必要があります。

このパターンでは、[サービスコントロールポリシー (SCP)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) を使用してインターネットアクセスを防止します。この SCP は、アカウントまたは組織単位 (OU) レベルで適用できます。SCP は、以下を防ぐことでインターネット接続を制限します。
+ VPC への直接インターネットアクセスを許可する IPv4 または IPv6 [インターネットゲートウェイ](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html)の作成またはアタッチ
+ 別の VPC を介した間接的なインターネットアクセスを許可する可能性のある [VPC ピアリング接続](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html)の作成または受け入れ
+ VPC リソースへの直接インターネットアクセスを許可する可能性のある [AWS Global Accelerator](https://docs.aws.amazon.com/global-accelerator/latest/dg/what-is-global-accelerator.html) 設定の作成または更新

## 前提条件と制限
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-prereqs"></a>

**前提条件**
+ 組織として AWS アカウント 管理される 1 つ以上の AWS Organizations。
+ [すべての機能は で有効になっています](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) AWS Organizations。
+ 組織内で[有効な SCP](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html)。
+ 以下のアクセス許可:
  + 組織の管理アカウントへのアクセス。
  + SCP の作成。最低限必要な権限の詳細については「[Creating an SCP](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_create.html#create-an-scp)」をご確認ください。
  + SCP のターゲットアカウントまたは組織単位 (OU) へのアタッチ。最小権限の詳細については「[Attaching and detaching service control policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_attach.html)」をご確認ください。

**制限事項**
+ SCP は、管理アカウントのユーザーやロールには影響を与えません。SCP は、組織内のメンバーアカウントにのみ影響を与えます。
+ SCPs組織の一部であるアカウントによって管理される AWS Identity and Access Management (IAM) ユーザーとロールにのみ影響します。詳細については、「[許可に対する SCP の影響](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html#scp-effects-on-permissions)」を参照してください。

## ツール
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-tools"></a>

**AWS サービス**
+ [AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) は、作成して一元管理する AWS アカウント 組織に複数の を統合するのに役立つアカウント管理サービスです。このパターンでは、 AWS Organizationsで[サービスコントロールポリシー (SCP)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) を使用します。
+ [Amazon Virtual Private Cloud (Amazon VPC)](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html) は、定義した仮想ネットワークに AWS リソースを起動するのに役立ちます。この仮想ネットワークは、ユーザー自身のデータセンターで運用されていた従来のネットワークと似ていますが、 AWSのスケーラブルなインフラストラクチャを使用できるという利点があります。

## ベストプラクティス
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-best-practices"></a>

組織でこの SCP を確立したら、インターネットアクセスに影響を与える AWS のサービス 可能性のある新機能に対処するために、頻繁に更新してください。

## エピック
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-epics"></a>

### SCP を作成してアタッチする
<a name="create-and-attach-the-scp"></a>


| タスク | 説明 | 必要なスキル | 
| --- | --- | --- | 
| SCP を作成します。 | 1. [AWS Organizations コンソール](https://console.aws.amazon.com/organizations/v2) にサインインします。組織の管理アカウントにサインインします。<br />2. 左のペインの **[ポリシー]** を選択します。<br />3. [ポリシー] ページで、**[サービスコントロールポリシー]** を選択します。<br />4. **サービスコントロールポリシー**ページで、[**Create policy**] (ポリシーの作成) を選択します。<br />5. **[新しいサービスコントロールポリシーを作成]** ページで、**ポリシー名**とオプションで**ポリシーの説明**を入力します。<br />6. (オプション) ポータルに [AWS タグ](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html)を追加します。<br />7. JSON エディタで、プレースホルダーポリシーを削除します。<br />8. 以下の ポリシーを JSON エディタに貼り付けます。<pre>{<br />  "Version": "2012-10-17",		 	 	 <br />  "Statement": [<br />    {<br />      "Action": [<br />        "ec2:AttachInternetGateway",<br />        "ec2:CreateInternetGateway",        <br />        "ec2:CreateVpcPeeringConnection",<br />        "ec2:AcceptVpcPeeringConnection",<br />        "ec2:CreateEgressOnlyInternetGateway"<br />      ],<br />      "Resource": "*",<br />      "Effect": "Deny"<br />    },<br />    {<br />      "Action": [<br />        "globalaccelerator:Create*",<br />        "globalaccelerator:Update*"<br />      ],<br />      "Resource": "*",<br />      "Effect": "Deny"<br />    }<br />  ]<br />}</pre><br />9. [**Create policy**] (ポリシーの作成) を選択します。 | AWS 管理者 | 
| SCP をアタッチします。 | 1. **[サービスコントロールポリシー]** ページで作成したポリシーを選択します。<br />2. [**Targets**] (ターゲット) タブで [**Attach**] (アタッチ) を選択します。<br />3. ポリシーをアタッチする OU またはアカウントを選択します。場合によっては、目的の OU またはアカウントを表示するため、OU を展開する必要があります。<br />4. **ポリシーの添付** を選択します。 | AWS 管理者 | 

## 関連リソース
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-resources"></a>
+ [AWS Organizations ドキュメント](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html)
+ [サービスコントロールポリシー (SCP)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html)
+ [AWS Gateway Load Balancer と を使用した一元的な検査アーキテクチャ AWS Transit Gateway](https://aws.amazon.com/blogs/networking-and-content-delivery/centralized-inspection-architecture-with-aws-gateway-load-balancer-and-aws-transit-gateway/) (AWS ブログ記事)