A company uses Amazon EC2 Auto Scaling in private subnets behind an Application Load Balancer (ALB). An application needs access to a shared configuration stored in S3, but the S3 bucket must remain private. Which approach is best?

Answer

Create a VPC Gateway Endpoint for S3, restrict the IAM role to only the required bucket/prefix, and have instances access S3 through the endpoint.

Explanation

A gateway endpoint keeps S3 traffic inside the AWS network, and a narrowly scoped IAM role enforces least privilege for the bucket/prefix. This fits private subnet constraints without exposing S3 publicly.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error

Related questions

You need a resilient event-driven architecture where downstream consumers can scale independently and process events asynchronously from an upstream service. Events must be retained for a short period, and consumers may temporarily fail without data loss. Which service and configuration best matches this?

View question →

A team stores application logs in Amazon S3 and wants near-real-time analytics on both access logs and application logs with a query service. They also require schema evolution and partitioning for cost control. Which integrated AWS approach is best?

View question →

A mobile app uses Amazon Cognito User Pools for authentication and must support device trust with step-up authentication when the risk signals change. Which capability most directly enables evaluating risk during sign-in and triggering additional verification?

View question →

A hybrid workload uses AWS Direct Connect with two independent virtual interfaces to separate prod and non-prod. During a planned maintenance window, you must prevent non-prod from failing over to prod while still allowing prod to fail over to an alternate path. Which design best satisfies this requirement?

View question →

You are designing a multi-tenant SaaS where each tenant must be isolated at the network and data access levels. You plan to use AWS PrivateLink and an RDS database per tenant. Which solution most effectively balances isolation with operational overhead?

View question →

You must migrate a legacy database to AWS with minimal application changes. The application requires low-latency read/write, supports eventual consistency for non-critical reads, and needs automated failover across two AZs. Which AWS service combination is most appropriate?

View question →

QuestionBack to list