Courseiva
Design Secure Architectures →mediumMultiple Choice

SAA-C03 Design Secure Architectures Practice Question

A developer needs to access an S3 bucket from an EC2 instance. For security best practices, the developer must avoid hardcoding long-term credentials on the instance. What is the most secure method to provide the necessary permissions?

⚠ Common exam trap

SAA-C03 often tests the misconception that security groups or bucket policies tied to IPs can authorize EC2-to-S3 access, when the correct answer is always instance roles for credential-free, least-privilege access.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Attach an IAM role to the EC2 instance with an S3 access policy.

Attaching an IAM role to the EC2 instance lets the instance obtain temporary, automatically rotated credentials via the Instance Metadata Service (IMDS), eliminating hardcoded long-term keys. The role's policy grants least-privilege S3 access, which is the AWS-recommended best practice for instance-to-service authentication.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Create an IAM user with S3 access and store the access key and secret key in a local configuration file.

    Why it's wrong here

    Storing static credentials in local configuration files is a high-risk security practice. If the file is accidentally committed to version control or accessed by unauthorized users, the credentials could be compromised, leading to potential data breaches. IAM roles are the standard, secure alternative to this method.

  • ✓

    Attach an IAM role to the EC2 instance with an S3 access policy.

    Why this is correct

    IAM roles provide temporary credentials via the AWS metadata service, which the SDK uses automatically. This method avoids hardcoding credentials on the disk, follows the principle of least privilege, and ensures that permissions are tied to the compute resource rather than a long-lived user identity.

  • ✗

    Configure the S3 bucket policy to allow public read access to the specific EC2 instance's public IP address.

    Why it's wrong here

    Bucket policies that rely on public IP addresses are insecure and difficult to maintain. IP addresses for EC2 instances can change, and public access policies expose the bucket to the internet, increasing the attack surface. IAM roles are the correct, secure mechanism for service-to-service authorization within AWS.

  • ✗

    Modify the instance security group to allow all traffic to and from the S3 endpoint.

    Why it's wrong here

    Security groups control network traffic at the instance level but do not govern authentication or authorization. Even if the network path is allowed, the instance still needs valid IAM credentials to perform API requests against S3. Security groups are irrelevant to the identity-based access requirements for S3.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This SAA-C03 question is part of Courseiva's 149-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

This SAA-C03 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAA-C03 exam.