Courseiva
Design for New SolutionseasyMultiple SelectObjective-mapped

SAP-C02 IAM Roles for EC2 Practice Question

A company wants to store configuration data for multiple applications securely. Each application runs on Amazon EC2 instances in an Auto Scaling group. The configuration includes database credentials and API keys. Which TWO services should be used together to achieve this?

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

IAM roles for EC2 instances.

And E. IAM roles for EC2 instances (C) allow EC2 to securely access other AWS services without hardcoding credentials. AWS Systems Manager Parameter Store (E) provides secure, hierarchical storage for configuration data and secrets. Together, they enable EC2 to retrieve configuration data like database credentials and API keys at runtime without embedding secrets in code or user data. Option A (Secrets Manager) is also valid for secrets, but the question asks for two services, and the marked correct pair is C and E. Option B (S3 with bucket policies) is insecure for secrets, and option D (EC2 user data) is not secure for credentials.

Answer analysis

Option-by-option breakdown

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

  • AWS Secrets Manager.

    Why it's wrong here

    Secrets Manager is also valid but not needed if Parameter Store is used.

  • Amazon S3 with bucket policies.

    Why it's wrong here

    S3 requires managing access keys.

  • IAM roles for EC2 instances.

    Why this is correct

    IAM roles allow instances to access Parameter Store without credentials.

  • EC2 user data scripts.

    Why it's wrong here

    User data is not secure for secrets.

  • AWS Systems Manager Parameter Store.

    Why this is correct

    Parameter Store securely stores configuration and secrets.

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

Courseiva writes every SAP-C02 question from scratch — 1,660 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-C02 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 SAP-C02 exam.