Courseiva
Identity and Access ManagementeasyMultiple ChoiceObjective-mapped

SCS-C03 Identity and Access Management Practice Question

An application running on an Amazon EC2 instance needs to access files in an Amazon S3 bucket. What is the most secure way to provide the application with the necessary credentials?

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

Assign an IAM role to the EC2 instance using an instance profile.

AWS recommends using IAM roles for EC2 instances to provide temporary credentials. This avoids the need to store sensitive access keys in application code or configuration files. The EC2 instance profile automatically manages the rotation and delivery of these credentials to the instance via the metadata service.

Answer analysis

Option-by-option breakdown

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

  • Store AWS access keys in a configuration file within the application's source code.

    Why it's wrong here

    Storing credentials in source code is a major security risk, as they can be easily exposed through version control systems or unauthorized access to the server. If these keys are compromised, they provide permanent access until manually revoked, making them difficult to manage and rotate securely.

  • Assign an IAM role to the EC2 instance using an instance profile.

    Why this is correct

    Using an IAM role allows the application to retrieve temporary security credentials from the Instance Metadata Service (IMDS). This is the most secure method because the credentials are automatically rotated by AWS and are never stored permanently on the instance or in the application code.

  • Use the root user's access keys to ensure the application has uninterrupted access to all resources.

    Why it's wrong here

    Using root credentials for any application task is a violation of the principle of least privilege and a critical security failure. Root credentials provide unrestricted access to the entire AWS account and should only be used for the few tasks that specifically require them, never for routine operations.

  • Create an IAM user with S3 permissions and hardcode its credentials in the EC2 User Data script.

    Why it's wrong here

    User Data scripts are stored in plain text and can be viewed by anyone with access to the EC2 console or the instance metadata. Hardcoding user credentials here is essentially the same as storing them in source code, exposing the account to unnecessary risk and management complexity.

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 SCS-C03 question is part of Courseiva's 99-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 SCS-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 SCS-C03 exam.