Granting CloudFormation Access to Private S3 Templates
Short answer
C Create a presigned URL for the template object and configure the CloudFormation stack to use it.
Question
Key Takeaways
The core concept is securing S3 object access for external services; the common trap is assuming VPC endpoints can be used for regional services like CloudFormation which operate outside the VPC boundary.
This question addresses secure access design for AWS CloudFormation when templates are stored in private Amazon S3 buckets. It establishes that presigned URLs provide the necessary temporary, authenticated access without exposing the resource publicly.
Common mistake: Many learners select Option A (Gateway VPC Endpoint) because it aligns with general security best practices for private S3 access. However, this fails because CloudFormation is a regional control-plane service and cannot utilize VPC endpoints located within customer VPCs.
Expert Analysis
Why the Answer Is Correct
Option C is correct because CloudFormation is a regional service that operates outside of any specific VPC. When a template is stored in a private S3 bucket (public access blocked), CloudFormation needs a way to retrieve it securely. A presigned URL provides temporary, authenticated access to a specific S3 object using the caller's credentials, satisfying the requirement for specific user requests while maintaining security.
Why the Other Options Are Wrong
Option A is incorrect because Gateway VPC Endpoints only work for traffic originating from within a VPC. Since CloudFormation runs on AWS infrastructure outside your VPC, it cannot route through a Gateway Endpoint. Option B is incorrect because API Gateway does not natively fetch S3 objects for CloudFormation stacks without complex Lambda integration, which is not specified. Option D is insecure as it involves temporarily opening public access, violating the principle of least privilege and security best practices.
Community Comment Notes
Community members correctly identified that CloudFormation is a regional service, making VPC endpoints invalid. As one commenter noted, "Cloudformation is a regional service so is outside the vpc." Another highlighted that presigned URLs grant temporary access without public exposure. The consensus supports C as the only viable technical solution among the choices.
Official Reference
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-syntax.html
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html
These links open the official vendor documentation in a new tab.
Exam Strategy
Always check the service scope (Regional vs Global) when considering VPC networking solutions. Regional services like CloudFormation, Route 53 (hosted zones), or IAM cannot use VPC Endpoints because they do not run inside your VPC.
Frequently Asked Questions
Why can't I use a VPC Endpoint for CloudFormation?
Is a presigned URL secure enough for production?
Community Votes
67% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
AnasAWS 👍 5 Answered Chttps://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html
-
FlyingHawk 👍 2 Answered AOptionA the gateway endpoint for S3 provides private access to the S3 template, aligns with security best practices, and incurs no additional costs. Option C (presigned URLs) potentially exposing the template to the public internet, even if temporarily. You only use C for the following reasons If you need a quick, temporary solution for granting access to the template. If you are not using a VPC or do not want to set up a VPC endpoint. If the template is not highly sensitive and temporary public exposure is acceptable.
-
robotgeek 👍 2 Answered AThe question states "specific user requests" meaning a shared URL does not meet the requirement. BUT with gateway VPC endpoint you can specify custom policies as in the following link https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-access.html
-
Dantecito 👍 1 Answered CC. Not the most secure but the only that works. A. Cloudformation is a regional service so is outside the vpc and gateway VPC endpoint only works inside a VPC. B. Doesn't do anything, we need a lambda between api gateway and cloudformation. D. public access is a no.
-
pujithacg8 👍 1C, A presigned URL grants temporary access to an S3 object without making it publicly accessible.
Show 1 more comment
-
flaviobrf 👍 2 Answered CFor me C is the right answer
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →