SAA-C03 Design Secure Architectures Practice Question
A company runs a containerized application on Amazon ECS on AWS Fargate. The application must read from an Amazon DynamoDB table and write logs to Amazon CloudWatch Logs. Security policy requires that the application use only temporary credentials and that each task have the least privilege needed. What should the company configure?
⚠ Common exam trap
The trap here is using the task execution role, which serves the ECS agent for image pulls and log delivery, instead of the task role that grants the application its own AWS permissions.
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 a task IAM role to the ECS task definition that grants DynamoDB read access and CloudWatch Logs write access.
An ECS task IAM role delivers temporary credentials to the application inside the container and scopes permissions to the specific needs of the task. This satisfies the temporary-credential policy and enforces least privilege. The task execution role serves the ECS agent, not the application, and Fargate has no customer-visible instance profile to attach.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Attach an EC2 instance profile to the underlying Fargate host so containers inherit its permissions.
Why it's wrong here
Fargate tasks do not expose an underlying EC2 instance to the customer, so there is no instance profile to attach. Even on EC2 launch type, an instance profile would grant all tasks on that instance the same permissions, violating least privilege. This option misunderstands how Fargate credential delivery works.
- ✗
Use the ECS task execution role to grant the application access to DynamoDB and CloudWatch Logs.
Why it's wrong here
The task execution role is used by the ECS agent to pull images, retrieve secrets, and send logs to CloudWatch, not by the application code for AWS API calls. Granting DynamoDB access to it would over-privilege the agent and still leave the application without credentials. The task role is the correct mechanism for application permissions.
- ✓
Attach a task IAM role to the ECS task definition that grants DynamoDB read access and CloudWatch Logs write access.
Why this is correct
A task IAM role provides temporary credentials to each task through the ECS task metadata endpoint, and permissions are scoped to exactly what the task needs. This satisfies both the temporary-credential and least-privilege requirements. Fargate supports task roles natively, so no instance-level role or static keys are involved.
- ✗
Store IAM user credentials in AWS Secrets Manager and inject them into the container as environment variables.
Why it's wrong here
Injecting long-lived IAM user credentials into containers violates the temporary-credential policy and increases the risk of leakage through logs or process inspection. Secrets Manager can store them, but they remain static and require rotation. This approach does not meet the least-privilege or temporary-credential requirements for the task.
Go deeper
Related to this question
About these practice questions
This SAA-C03 question is part of Courseiva's 935-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 →
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.