What are VPC endpoints and endpoint policies used for?
IntermediateConceptCloud Security, CIS and Compliance
Answer
VPC endpoints let resources reach AWS services privately, without an internet or NAT path. Gateway endpoints cover S3 and DynamoDB; interface endpoints (PrivateLink) cover most others.
Endpoint policies restrict what can be done through the endpoint, e.g. only access to buckets owned by our organisation, which blocks data exfiltration to an attacker's bucket:
{ "Effect": "Allow", "Principal": "*", "Action": "s3:*", "Resource": "*",
"Condition": { "StringEquals": { "aws:ResourceOrgID": "o-abc123" } } }
Combine with bucket policies using aws:SourceVpce to make the bucket reachable only through that endpoint.
More on Cloud Security, CIS and Compliance
What is the cloud shared responsibility model?BeginnerWhat is CSPM?BeginnerWhat are CIS Benchmarks, and what is Level 1 vs Level 2?BeginnerHow do you run a CIS assessment of an AWS account with Prowler?IntermediateName the main AWS security services and what each does.BeginnerWhat should you know about CloudTrail configuration?Intermediate