背景と動機
AWSをエンタープライズな環境で利用する際、VPCは必須でありできる限りインターネットに出ていく箇所は絞り込むのが王道です。
他方、AWSを使うからにはマネージドサービスをフル活用するのがコスト最適化とアジリティを一挙両得なベストプラクティスです。
ところがマネージドサービスと触れ合うService Endpointがインターネット側にあると非常に使いづらい。ホント勘弁してくださいAWSさん。
というニーズが強いため、VPC EndpointというVPCからインターネットを経由せず、Service Endpointと通信ができる素晴らしい機能が提供されています。
だがしかし、「どこぞの他者のアカウントのクレデンシャル持ち込んでEndpoint経由で色々持ち出してやるぜ」攻撃が可能になってしまいます。こればかりはSecurity GroupのようなL4層では防御できません。
そこで、一部のService Endpointには「Endpointポリシー」が適用でき、きめ細やかかな制御が可能になります。そう!これが欲しかったんだ!
でも、一部なんですよね・・・誰かまとめてくれないのかな・・・・
(2019/06/20追記) ポリシー適用可能かは、まとまってた。https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html
※英語表記でご覧くださいませ
で、まとめた
(2019/09/19時点、東京リージョン)
| VPC Endpoint | タイプ | Endpointポリシー設定 | KMS統合 | 備考 |
|---|---|---|---|---|
| sagemaker.notebook | Interface | ○ | ○** | aws.sagemaker..notebook |
| appstream.api | Interface | 2019/9/19 NEW! | ||
| appstream.streaming | Interface | 2019/9/19 NEW! | ||
| athena | Interface | ○ | 2019/9/19 NEW! | |
| cloudformation | Interface | |||
| cloudtrail | Interface | ○ | ||
| codebuild | Interface | ○ | ○ | |
| codecommit | Interface | ○ | ○* | |
| codepipeline | Interface | ○ | ||
| config | Interface | |||
| datasync | Interface | 2019/9/19 NEW! | ||
| dynamodb | Gateway | ○ | ○* | |
| ec2 | Interface | |||
| ec2messages | Interface | |||
| ecr.api | Interface | |||
| ecr.dkr | Interface | |||
| ecs | Interface | |||
| ecs-agent | Interface | |||
| ecs-telemetry | Interface | |||
| elastic-inference.runtime | Interface | |||
| elasticloadbalancing | Interface | ○ | ||
| events | Interface | ○ | ||
| execute-api | Interface | ○ | ||
| git-codecommit | Interface | ○ | ○* | |
| glue | Interface | ○ | ||
| kinesis-firehose | Interface | ○ | ○ | |
| kinesis-streams | Interface | ○ | ||
| kms | Interface | - | ||
| logs | Interface | ○ | ○ | |
| monitoring | Interface | |||
| qldb.session | Interface | 2019/9/19 NEW! | ||
| rekognition | Interface | 2019/9/19 NEW! | ||
| s3 | Gateway | ○ | ○ | |
| sagemaker.api | Interface | ○ | ○** | |
| sagemaker.runtime | Interface | ○ | ||
| secretsmanager | Interface | ○ | ||
| servicecatalog | Interface | |||
| sns | Interface | ○ | ○ | |
| sqs | Interface | ○ | ○ | |
| ssm | Interface | |||
| ssmmessages | Interface | |||
| storagegateway | Interface | 2019/9/19 NEW! | ||
| sts | Interface | ○ | 2019/9/19 NEW! | |
| transfer | Interface | |||
| transfer.server | Interface | |||
*Supports only AWS managed KMS keys. |
||||
**このあたり→https://aws.amazon.com/jp/blogs/news/aws-kms-based-encryption-is-now-available-for-training-and-hosting-in-amazon-sagemaker/
|
特に、データを保存できるサービスはKMS統合にて暗号化サポートがあると、さらに安心・万全ですね。
こちらを参照しました: https://aws.amazon.com/kms/features/
それでは良きAWSライフを!
(2019/06/20追記) 妙に増えたな、と思っていたら、後日でニュース出てました。https://aws.amazon.com/jp/about-aws/whats-new/2019/06/now-add-endpoint-policies-to-interface-endpoints-for-aws-services/
(2019/09/19追記) 以下のエンドポイントが増えていました。Athenaは結構うれしい。
appstream.api
appstream.streaming
athena
datasync
qldb.session
rekognition
storagegateway
sts