AWS Certified CloudOps Engineer Associate SOA-C03 [2026]

Amazon S3 Gateway and Interface VPC Endpoints: Architecture, Selection, and Deployment

Understand the differences between Amazon S3 gateway and interface VPC endpoints, including routing, DNS, cross-network access, cost, policies, and gateway endpoint deployment.

AWS Certified CloudOps Engineer Associate SOA-C03 [2026]AWS Certified CloudOps Engineer Associate SOA-C03 [2026]Updated Sep 1, 2026
Study options
WatchComing later
ListenComing later
ReadAvailable
ReviewComing later

Study guide

Technical reference and lesson notes

Amazon S3 Gateway and Interface VPC Endpoints

Purpose of This Lesson

This lesson explains how to connect resources in a VPC to Amazon S3 without sending traffic through an internet gateway and the public internet. It focuses on the differences between gateway endpoints and interface endpoints, then demonstrates how to deploy, test, restrict, and remove an S3 gateway endpoint.

The topic is especially relevant to the AWS Certified CloudOps Engineer Associate context because endpoint selection depends on routing behavior, DNS requirements, network location, supported access paths, and cost.

Key Concepts

  • VPC endpoint: A private connectivity mechanism that lets VPC resources reach supported AWS services without relying on the public internet path.
  • S3 gateway endpoint: Uses route tables and an AWS-managed prefix list to direct S3 traffic to the endpoint. It is not billed according to the lecture.
  • S3 interface endpoint: Uses private IP addresses assigned from the VPC through elastic network interfaces. It supports endpoint-specific S3 DNS names and is billed.
  • Prefix list: A managed collection of service IP ranges. For S3, the route table destination is the S3 prefix list, and the target is the gateway VPC endpoint ID.
  • Endpoint policy: A policy attached to the endpoint that controls what requests may pass through it. Changing an allow policy to deny can be used to verify that traffic is actually using the endpoint.
  • Session Manager: An AWS Systems Manager capability that communicates with the SSM Agent on an EC2 instance. The lecture identifies interface endpoints as an option for this communication.

S3 Endpoint Architecture and Routing

Amazon S3 has public IP addresses in the AWS Region. A gateway endpoint does not change S3 into a private-IP service. Instead, it changes the path used to reach those S3 addresses.

With a gateway endpoint:

  1. The endpoint is associated with one or more VPC route tables.
  2. AWS adds a route whose destination is an S3 prefix list.
  3. The target of that route is the gateway endpoint ID.
  4. Traffic destined for the S3 address ranges follows the endpoint route rather than the default route through the internet gateway.

This is sometimes described as private networking because the traffic does not traverse the internet gateway and public internet path. The important nuance is that the gateway endpoint still targets S3 public IP ranges; it does not provide private IP addresses inside the VPC.

The same standard Amazon S3 DNS names can be used with a gateway endpoint. The endpoint route is selected because the destination resolves into the S3 ranges represented by the prefix list.

Gateway and Interface Endpoint Comparison

CharacteristicS3 Gateway EndpointS3 Interface Endpoint
Addressing described in the lessonUses S3 public IP addressesUses private IP addresses from the VPC
Routing mechanismRoute-table entry to an S3 prefix listInterface endpoint network interfaces and private connectivity
DNS namesUses standard S3 DNS namesRequires endpoint-specific S3 DNS names
On-premises accessNot supportedSupported
Access from another AWS RegionNot supportedPossible through VPC peering or a transit gateway
BillingNot billed according to the lessonBilled
Main selection advantageSimple, cost-effective VPC-to-S3 pathPrivate-IP and cross-network access requirements

Session Manager Connectivity Context

Session Manager uses the Systems Manager service to communicate with the SSM Agent running on an EC2 instance. The lecture presents an interface endpoint as a way to provide this communication privately.

However, an interface endpoint is not always required for Session Manager. If the instance has outbound connectivity through an internet gateway and outbound TCP port 443 is permitted to the required Systems Manager endpoints, the agent can initiate outbound communication and receive connection requests through that channel.

Therefore, the decision is based on the network design:

  • Choose interface endpoints when the instance must communicate with Systems Manager through private VPC connectivity.
  • Use outbound internet connectivity when that path is allowed and consistent with the security design.
  • Do not confuse the S3 gateway endpoint with the interface endpoints used by services such as Session Manager.

Lab Workflow: Deploying an S3 Gateway Endpoint

1. Prepare a test EC2 instance

The demonstration uses an Amazon Linux 2023 instance in the default VPC. The instance does not require a key pair because the lab connects through EC2 Instance Connect. It uses an existing security group that permits the required access and an IAM role with at least read-only access to S3.

The demonstration places the instance in a public subnet. If a default VPC contains private subnets, select a public subnet for this particular Instance Connect-based workflow.

2. Create the endpoint

In the VPC console:

  1. Open Endpoints.
  2. Choose Create endpoint.
  3. Keep AWS services selected.
  4. Search for S3.
  5. Select the Gateway endpoint type rather than the Interface type.
  6. Select the target VPC.
  7. Select the route table used by the test instance.
  8. Initially leave the endpoint policy at full access for the demonstration.
  9. Create the endpoint.

A gateway endpoint must be associated with the route table used by the workload. Creating it without selecting the relevant route table will not direct that workload’s S3 traffic through the endpoint.

3. Verify the route

Open the selected route table and inspect its routes. A new route should appear with:

  • Destination: The S3 prefix list, such as a Region-specific S3 prefix list.
  • Target: The VPC endpoint ID.

The prefix list represents the IP ranges used by the S3 servers. Requests to those ranges now match the endpoint route instead of the ordinary internet gateway route.

4. Test S3 access

Connect to the EC2 instance using EC2 Instance Connect and run:

aws s3 ls

A bucket listing or a successful response with no bucket output indicates that the command reached S3 without an error. The test depends on both the instance’s IAM permissions and the endpoint policy allowing the request.

5. Validate endpoint-policy enforcement

To demonstrate that traffic is using the gateway endpoint:

  1. Edit the endpoint policy.
  2. Change the relevant allow behavior to deny.
  3. Save the policy.
  4. Run aws s3 ls again.

The request should fail with an access-denied error for the list-buckets operation. This is evidence that the S3 request is being evaluated by the endpoint policy rather than simply taking the internet gateway path.

Restore the policy to allow access and repeat the command. Successful access after restoration confirms the policy change was the cause of the failure.

6. Clean up

Delete the VPC endpoint after testing. Refresh and inspect the route table to confirm that the prefix-list route has been removed. Then terminate the test EC2 instance.

Exam- or Assessment-Relevant Takeaways

  • For ordinary VPC-to-S3 access where cross-Region and on-premises access are not required, a gateway endpoint is the key selection.
  • Gateway endpoints are identified in route tables by a destination that is an S3 prefix list and a target that is the endpoint ID.
  • An S3 gateway endpoint does not mean S3 uses private IP addresses. The lecture explicitly distinguishes public S3 IPs from the private routing path that avoids the internet gateway.
  • An interface endpoint is the relevant choice when private IP addressing, on-premises access, or access through VPC peering or a transit gateway is required.
  • Gateway endpoints use standard S3 DNS names; interface endpoints require endpoint-specific S3 DNS names.
  • Endpoint policies can deny requests even when the EC2 instance’s IAM role permits them. Both layers must allow the request.
  • A gateway endpoint does not provide S3 access from on-premises data centers or from another AWS Region according to the lecture.
  • Session Manager connectivity through private VPC networking uses interface endpoints, but outbound port 443 through an internet gateway is an alternative when permitted.

Tool / Feature Decision Guide

Choose an S3 gateway endpoint when:

  • Workloads inside the VPC need to reach S3.
  • Standard S3 DNS names are acceptable.
  • Access is limited to the VPC’s supported local routing context.
  • On-premises and cross-Region access are not required.
  • Avoiding endpoint charges is important.
  • You want a route-table-based design using an S3 prefix list.

Choose an S3 interface endpoint when:

  • The design requires private IP addresses from the VPC for S3 access.
  • On-premises data centers need to reach S3 through the endpoint.
  • A VPC in another Region must access the endpoint through VPC peering or a transit gateway.
  • Endpoint-specific S3 DNS names are acceptable.
  • The additional endpoint charges are justified by the connectivity requirements.

For Session Manager:

  • Use Systems Manager interface endpoints when private connectivity to the SSM Agent is required.
  • An interface endpoint may not be necessary when the instance can make permitted outbound HTTPS connections on port 443 to the required service endpoints.

Common Traps / Misconceptions

  • Trap: A gateway endpoint gives S3 private IP addresses. It does not. S3 public IP ranges are still represented in the route; the traffic avoids the internet gateway and public internet path.
  • Trap: Creating the endpoint automatically affects every subnet. A gateway endpoint affects traffic through the route tables selected during creation. The relevant workload’s route table must be associated.
  • Trap: Gateway and interface endpoints are interchangeable. They differ in addressing, routing, DNS, supported network locations, and billing.
  • Trap: An S3 gateway endpoint supports on-premises access. The lecture states that it does not.
  • Trap: An EC2 IAM role alone determines whether S3 access succeeds. The endpoint policy can independently allow or deny the request.
  • Trap: Session Manager always requires an interface endpoint. The lecture describes outbound port 443 through an internet gateway as an alternative when permitted.
  • Trap: A successful aws s3 ls proves only IAM permissions. In the lab, changing the endpoint policy to deny and observing access denied helps demonstrate that the endpoint route and policy are involved.
  • Trap: Deleting the endpoint is sufficient cleanup. Confirm that its route has also disappeared from the route table, then terminate the test instance.

Real-World Engineer / Analyst Notes

  • Treat endpoint configuration as a combination of routing, identity, and endpoint authorization. A successful design requires all three to align.
  • When troubleshooting, inspect the workload’s actual route table first. A correctly created endpoint that is not attached to the relevant route table will not change the workload’s path.
  • Use a controlled endpoint-policy change as a diagnostic technique, but restore the intended policy immediately after testing.
  • Document whether the requirement is VPC-local access, on-premises access, or cross-Region access. That single requirement often determines gateway versus interface selection.
  • Remember that public IP addressing and public internet routing are separate concepts. A service can use public addresses while traffic follows an AWS private network path that bypasses the internet gateway.
  • Remove temporary endpoints and test instances after a lab or troubleshooting exercise, and verify route-table cleanup rather than assuming it occurred.

Quick Reference Summary

  • Gateway endpoint: Route-table-based S3 access using an S3 prefix list and endpoint ID; standard S3 DNS names; no on-premises or cross-Region access in this lesson; not billed.
  • Interface endpoint: Private VPC IP addresses; endpoint-specific S3 DNS names; supports on-premises access and cross-Region access through peering or transit gateway; billed.
  • Gateway endpoint route: S3 prefix list destination → gateway endpoint target.
  • Test command: aws s3 ls
  • Policy test: Change endpoint allow behavior to deny, confirm access denied, then restore allow.
  • Session Manager: Interface endpoint for private service communication, or permitted outbound port 443 through an internet gateway as an alternative.
  • Cleanup: Delete the endpoint, verify route removal, and terminate the test instance.

Flashcards

Q: A workload in a VPC only needs local access to Amazon S3 and cost avoidance is important. Which endpoint type should normally be selected?

A: Select an S3 gateway endpoint. It uses a route-table entry and is not billed according to the lesson, while the scenario does not require interface-endpoint capabilities such as on-premises access.

Q: What route does an S3 gateway endpoint add to a route table?

A: It adds a route with an S3 prefix list as the destination and the gateway VPC endpoint ID as the target.

Q: Does an S3 gateway endpoint cause S3 to use private IP addresses?

A: No. S3 still uses public IP ranges, but traffic matching those ranges avoids the internet gateway and public internet path.

Q: When is an S3 interface endpoint preferable to a gateway endpoint?

A: Use an interface endpoint when private VPC IP addresses, on-premises access, or access from another Region through VPC peering or a transit gateway is required.

Q: How do S3 gateway and interface endpoints differ in DNS behavior?

A: Gateway endpoints can use the standard S3 DNS names. Interface endpoints require endpoint-specific S3 DNS names.

Q: An on-premises data center must access S3 through a VPC-connected private path. Which endpoint choice fits the lecture’s guidance?

A: Choose an S3 interface endpoint. The lecture states that gateway endpoints do not allow on-premises access, while interface endpoints do.

Q: What must be selected during gateway endpoint creation for a workload to use the endpoint?

A: The route table used by that workload must be associated with the endpoint. The endpoint does not automatically alter every route table in the VPC.

Q: What does the S3 prefix list represent in the gateway endpoint route?

A: It represents the IP address ranges used by S3 servers, allowing traffic destined for those ranges to match the endpoint route.

Q: An EC2 instance has an IAM role allowing S3 reads, but aws s3 ls returns access denied after an endpoint-policy change. What is the likely cause?

A: The endpoint policy is denying the request. IAM permissions and the endpoint policy are separate authorization layers, and both must permit the operation.

Q: How can the lab demonstrate that S3 traffic is being evaluated by the gateway endpoint?

A: Change the endpoint policy from allow to deny, rerun aws s3 ls, and observe the access-denied result. Restore the allow policy afterward.

Q: Does Session Manager always require an interface endpoint?

A: No. An interface endpoint supports private communication with the SSM Agent, but permitted outbound TCP port 443 through an internet gateway can be an alternative.

Q: Why is an interface endpoint relevant to Session Manager?

A: Session Manager needs to communicate with the SSM Agent on the EC2 instance, and an interface endpoint can provide private connectivity to the Systems Manager service.

Q: What cross-Region capability distinguishes the interface endpoint in this lesson?

A: A VPC in another Region can access an interface endpoint through VPC peering or a transit gateway; the gateway endpoint does not provide that capability according to the lecture.

Q: What cleanup checks should follow deletion of an S3 gateway endpoint?

A: Refresh the route table and confirm that the S3 prefix-list route has been removed, then terminate the temporary EC2 instance.

Practice Questions

Question 1

An EC2 workload in a VPC must access S3. The architecture must avoid the internet gateway, does not need on-premises or cross-Region access, and the team wants to avoid endpoint charges. Which option is the best fit?

A. S3 interface endpoint
B. S3 gateway endpoint
C. NAT gateway only
D. Session Manager interface endpoint

Correct answer: B. S3 gateway endpoint.

A gateway endpoint provides route-table-based S3 access without the internet gateway and is not billed according to the lecture. The other choices either do not directly satisfy the requirement or add an unnecessary interface-based design.

Question 2

After creating an S3 gateway endpoint, an engineer checks the route table. Which route confirms that S3 traffic is being directed to the endpoint?

A. Destination 0.0.0.0/0, target internet gateway
B. Destination the S3 prefix list, target the VPC endpoint ID
C. Destination the VPC CIDR, target a NAT gateway
D. Destination a private subnet CIDR, target a transit gateway

Correct answer: B. Destination the S3 prefix list, target the VPC endpoint ID.

That is the defining route-table pattern for the gateway endpoint described in the lesson.

Question 3

A company needs an S3 endpoint reachable from an on-premises data center connected to AWS. Which choice is supported by the lecture?

A. Gateway endpoint, because it uses standard S3 DNS names
B. Gateway endpoint, because it is not billed
C. Interface endpoint, because it supports on-premises access
D. No endpoint, because S3 cannot be reached privately

Correct answer: C. Interface endpoint, because it supports on-premises access.

The lecture explicitly states that gateway endpoints do not allow access from on-premises data centers, while interface endpoints do.

Question 4

An EC2 instance can run aws s3 ls successfully. The engineer changes the S3 gateway endpoint policy to deny and the same command then returns access denied. What does this most directly demonstrate?

A. The instance lost its IAM role
B. The S3 service changed its public IP addresses
C. The request is being evaluated through the endpoint policy
D. The route table stopped using the prefix list because the endpoint was deleted

Correct answer: C. The request is being evaluated through the endpoint policy.

The endpoint policy change directly explains the access-denied result and demonstrates that the request is passing through the endpoint path being tested.

Question 5

An organization wants Session Manager connectivity for private EC2 subnets but permits no outbound internet access. Which design aligns with the lecture?

A. Use an S3 gateway endpoint only
B. Use Systems Manager interface endpoints
C. Use an internet gateway and allow all outbound ports
D. Use an S3 interface endpoint instead of Systems Manager endpoints

Correct answer: B. Use Systems Manager interface endpoints.

The lecture identifies interface endpoints as the private connectivity option for communication between Session Manager and the SSM Agent. An S3 endpoint does not provide that Systems Manager connectivity.

WordPress Metadata

Suggested Slug:
s3-gateway-interface-vpc-endpoints

Meta Description:
Understand the differences between Amazon S3 gateway and interface VPC endpoints, including routing, DNS, cross-network access, cost, policies, and gateway endpoint deployment.

Tags:
AWS, Amazon S3, VPC endpoints, Gateway endpoints, Interface endpoints, VPC routing, AWS Systems Manager, Session Manager, EC2, AWS networking