Simplifying S3 Access with an Interface VPC Endpoint and Route 53
Use Route 53 private hosted zones so clients can reach S3 through a VPC endpoint without --endpoint-url.
The S3 interface VPC endpoint requires specifying the --endpoint-url option when accessing S3. However, to simplify access and avoid specifying this option repeatedly, Route 53 private hosted zones can be used.

S3 VPC Endpoint
Create an interface VPC endpoint:
aws ec2 create-vpc-endpoint \ --vpc-id $YOUR_VPC_ID \ --vpc-endpoint-type Interface \ --service-name com.amazonaws.$YOUR_REGION.s3 \ --subnet-ids $YOUR_PRIVATE_SUBNET_IDS \ --security-group-ids $YOUR_SECURITY_GROUP_IDSVerify the creation of the endpoint and retrieve its DNS entries:
aws ec2 describe-vpc-endpoints \ --filters Name=service-name,Values=com.amazonaws.$YOUR_REGION.s3 \ --query "VpcEndpoints[*].DnsEntries"[ [ { "DnsName": "*.vpce-xxxxxxxxxxxxxxxxx-xxxxxxxx.s3.ap-northeast-1.vpce.amazonaws.com", "HostedZoneId": "xxxxxxxxxxxxxx" }, { "DnsName": "*.vpce-xxxxxxxxxxxxxxxxx-xxxxxxxx-ap-northeast-1a.s3.ap-northeast-1.vpce.amazonaws.com", "HostedZoneId": "xxxxxxxxxxxxxx" } ]]Confirm S3 access using the VPC endpoint’s URL:
The --region option must be specified.
aws s3 ls \ --region <YOUR_REGION> \ --endpoint-url http://vpce-xxxxxxxxxxxxxxxxx-xxxxxxxx.s3.ap-northeast-1.vpce.amazonaws.comRoute 53 Private Hosted Zone
A Route 53 private hosted zone removes the need to reference that URL directly:
aws route53 create-hosted-zone \ --name s3.$YOUR_REGION.amazonaws.com \ --vpc VPCRegion=$YOUR_REGION,VPCId=$YOUR_VPC_ID \ --caller-reference "$(date)"Add an A (ALIAS) record pointing to the VPC endpoint using the Route 53 console.
Click Create record.

Select A as the record type and choose Alias to VPC endpoint as the routing target.

After configuring the hosted zone, you can access S3 without specifying the --endpoint-url option:
The --region option must be specified.
aws s3 ls --region ap-northeast-1Conclusion
Pairing an S3 interface VPC endpoint with a Route 53 private hosted zone made aws s3 ls work over the private endpoint without ever passing --endpoint-url. Creating the private hosted zone for s3.$YOUR_REGION.amazonaws.com with an A (ALIAS) record pointing at the interface endpoint is what makes that possible — the standard S3 hostname now resolves to the VPC endpoint automatically for anything inside that VPC. That matters most for tools and SDKs that don’t expose an easy way to pass a custom endpoint, since this approach requires no code changes on the client side at all. The hosted zone’s resolution is scoped strictly to the VPC it’s associated with, though, so a client connecting from a different VPC or over an on-premises VPN won’t pick it up unless that network is associated with the same private zone.
Related posts
Sign in with Slack Using Cognito User Pools and OIDC
Federating Cognito user pools with Slack over OIDC and wiring "Sign in with Slack" into a Next.js app with Amplify.
Deploying FastAPI on AWS Lambda with Lambda Web Adapter
This example guides you through the process of developing API backends with FastAPI using Lambda Web Adapter.
API Gateway WebSocket: Implementing a Mock Integration
Building an API Gateway WebSocket API entirely with mock integrations, returning canned responses with no backend Lambda involved.
Uploading to S3 Through CloudFront Pre-Signed URLs
CloudFront signed URLs let you upload to S3 through a custom domain—useful when direct S3 pre-signed URLs are not an option.
AWS EventBridge Scheduler: Starting and Stopping EC2 on a Schedule
Starting and stopping EC2 instances on a cron schedule with EventBridge Scheduler calling the EC2 API directly, no Lambda involved.
