Best way to manage access to a VPC Endpoint

0

A customer has a need for Cloudwatch Logs in a private VPC, but they want to restrict access to this endpoint for authorized hosts only, to prevent accidental confidential information to leak out of the VPC. What's the best way to accomplish this?

a.Instance role: Control access to the VPCe via an Instance Role IAM policy b. VPC Endpoint policy: Can we add ec2-based restrictions to a VPCe policy? c. VPC Endpoint security group: Selectively allow only authorized IP addresses

I would have a preference for an Instance Role solution, because then we can manage access at the logical EC2 level, regardless of assigned IP address.

Are there best practices or better ways to accomplish this goal?

1回答
0
承認された回答

As outlined, there can be various ways to control the access to a private VPC. In your specific case, it seems it is a typical access control to a VPC endpoint for CloudWatch Services. What you can do is to

  1. Specify a VPC endpoint policy for your CLoudWatch Services, for example: { "Statement": [ { "Sid": "PutOnly", "Principal": { "AWS": "arn:aws:iam::AWS-account-ID:role/role-name" }, "Action": [ "logs:CreateLogStream", "logs:PutLogEvents" ], "Effect": "Allow", "Resource": "*" } ] } NOTE: modify further detailed requirements on Action and Resources if necessary.

  2. Create a specific IAM role allowing the permission for access the VPC CLoudWatch logs

  3. Provision the Limited (EC2) instances you will allow to access the VPC CloudWatch endpoint service.

This is inline with your a. using IAM role approach. You might still need to make sure you have Network layer of rules like Security Group to allow the EC2 instance to flow through besides the endpoint policy.

AWS
回答済み 4年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ