SCS-C02 Identity and Access Management Practice Question
A developer needs to allow an EC2 instance to read from a DynamoDB table named 'Orders' in the same account. The security team requires that the permissions be granted using an instance profile. Which steps should be taken?
⚠ Common exam trap
SCS-C02 often tests the difference between IAM roles and instance profiles. Candidates may think they can attach a role directly to an EC2 instance, but an instance profile is required. Also, they might confuse attaching policies to instance profiles instead of roles.
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
✓
Create an IAM role with a policy that allows dynamodb:GetItem on the 'Orders' table, create an instance profile, add the role to the profile, and launch the EC2 instance with the instance profile
The correct steps are to create an IAM role with the necessary policy, create an instance profile, add the role to the instance profile, and then launch the EC2 instance with that instance profile. This grants the EC2 instance temporary credentials to access DynamoDB. The instance profile is the container for the role and is required for EC2 to assume the role.
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 role with a policy that allows dynamodb:GetItem on the 'Orders' table, create an instance profile, add the role to the profile, and launch the EC2 instance with the instance profile
Why this is correct
This is the correct and canonical method. Create an IAM role that includes a policy granting the `dynamodb:GetItem` action on the `Orders` table, define a trust policy that lets the EC2 service (`ec2.amazonaws.com`) assume it, and then create an instance profile containing that role. When you launch the EC2 instance with the instance profile, AWS automatically supplies temporary credentials through the instance metadata service (IMDSv2), so the SDK can read from DynamoDB without any stored keys. This avoids long-lived credentials and is the supported mechanism for giving an EC2 instance permissions.
- ✗
Create an instance profile and attach a policy to it, then launch the EC2 instance with the instance profile
Why it's wrong here
An instance profile is not a policy entity; it is a container that holds an IAM role and provides that role's credentials to the EC2 instance via its metadata service. You cannot attach a managed or inline policy to an instance profile — the API will reject it because the profile lacks an identity for IAM to evaluate. The correct approach is to create a role, attach the policy to that role, and then add the role to the instance profile. This option fails because it attempts to treat the profile as a policy target.
- ✗
Create an IAM role with the required policy, then attach the role directly to the EC2 instance during launch
Why it's wrong here
You cannot attach an IAM role directly to an EC2 instance as if it were a resource; instead, you must associate the role with an instance profile, which is the wrapper the EC2 service uses to establish the role assumption. When you launch an instance in the EC2 API, the parameter is an instance profile name/ARN, not a role's ARN, and any attempt to plug a role directly into those launch parameters will be invalid. In the AWS Management Console, the dropdown for an IAM role during launch actually lists instance profiles, which is why this option misinterprets the console flow. The role gets assumed through the profile, not attached.
- ✗
Create an IAM user with programmatic access, store the access key in a secure S3 bucket, and have the EC2 instance retrieve the credentials at startup
Why it's wrong here
Hardcoding or storing IAM user access keys in an S3 bucket and then harvesting them at startup is insecure because the EC2 instance still has to bootstrap with some other set of credentials to get into the bucket — there is no way around that chicken-and-egg problem without eventually creating a local copy of a static secret. It also perpetuates long-lived credentials, which magnifies any leak from a compromised S3 bucket, exposed startup logs, or a user who later leaves. AWS best practice is to rely on temporary credentials delivered via an instance profile, not to copy static keys onto a server. This option violates that pattern.
Go deeper
Related to this question
About these practice questions
This SCS-C02 question is part of Courseiva's 1,205-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 SCS-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 SCS-C02 exam.