- A
CloudFrontFullAccess
Why wrong: This policy is for CloudFront distributions, not S3 bucket operations.
- B
AdministratorAccess
Why wrong: Overly permissive and not a best practice.
- C
AmazonS3ReadOnlyAccess
Why wrong: This policy only allows read access, not write.
- D
A custom policy allowing s3:PutObject and s3:ListBucket on the target bucket.
These are the minimum permissions needed to upload files to S3.
Quick Answer
The correct IAM policy to attach to the CodePipeline service role is a custom policy granting s3:PutObject and s3:ListBucket on the target S3 bucket. This resolves the access denied error because CodePipeline’s deploy stage must upload static website files to the bucket, requiring write permission via s3:PutObject, and it also needs s3:ListBucket to verify the upload succeeded and to manage object listings during deployment. On the AWS Certified SAP on AWS Specialty PAS-C01 exam, this scenario tests your understanding of least-privilege IAM policies for CI/CD pipelines, often appearing as a trap where candidates mistakenly attach a full S3 full-access policy or the AmazonS3ReadOnlyAccess managed policy, which lacks write permissions. The key insight is that CodePipeline’s service role is distinct from the pipeline’s source or build roles, so granular S3 actions must be explicitly allowed. Memory tip: “Put and List to persist and exist”—you need PutObject to write files and ListBucket to confirm they’re there.
PAS-C01 Operations and Maintenance Practice Question
This PAS-C01 practice question tests your understanding of operations and maintenance. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A DevOps engineer is troubleshooting an AWS CodePipeline that fails at the Deploy stage. The pipeline deploys a static website to an S3 bucket configured for website hosting. The error message indicates 'Access Denied' when the pipeline tries to upload files. Which IAM policy should be attached to the CodePipeline service role to resolve 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
A custom policy allowing s3:PutObject and s3:ListBucket on the target bucket.
The CodePipeline service role needs permissions to write objects to the S3 bucket and list its contents to verify the upload. A custom policy with s3:PutObject and s3:ListBucket on the target bucket grants exactly these required actions, resolving the 'Access Denied' error during the Deploy stage.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
CloudFrontFullAccess
Why it's wrong here
This policy is for CloudFront distributions, not S3 bucket operations.
- ✗
AdministratorAccess
Why it's wrong here
Overly permissive and not a best practice.
- ✗
AmazonS3ReadOnlyAccess
Why it's wrong here
This policy only allows read access, not write.
- ✓
A custom policy allowing s3:PutObject and s3:ListBucket on the target bucket.
Why this is correct
These are the minimum permissions needed to upload files to S3.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often choose a broad managed policy like AdministratorAccess or CloudFrontFullAccess, overlooking that the minimal custom policy with specific S3 actions is the correct and secure solution for the 'Access Denied' error.
Detailed technical explanation
How to think about this question
Under the hood, CodePipeline uses its service role to assume an IAM role and make AWS API calls on behalf of the pipeline. The s3:PutObject action is required for uploading objects, while s3:ListBucket is needed to verify bucket existence and permissions before the upload; without both, the pipeline fails with an Access Denied error. In a real-world scenario, if the bucket uses SSE-KMS encryption, you must also include kms:GenerateDataKey and kms:Decrypt permissions in the custom policy.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Operations and Maintenance — study guide chapter
Learn the concepts, then practise the questions
- →
Operations and Maintenance practice questions
Targeted practice on this topic area only
- →
All PAS-C01 questions
1,733 questions across all exam domains
- →
AWS Certified SAP on AWS Specialty PAS-C01 study guide
Full concept coverage aligned to exam objectives
- →
PAS-C01 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related PAS-C01 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Design of SAP Workloads on AWS practice questions
Practise PAS-C01 questions linked to Design of SAP Workloads on AWS.
Technology practice questions
Practise PAS-C01 questions linked to Technology.
Migration practice questions
Practise PAS-C01 questions linked to Migration.
Operations and Maintenance practice questions
Practise PAS-C01 questions linked to Operations and Maintenance.
PAS-C01 fundamentals practice questions
Practise PAS-C01 questions linked to PAS-C01 fundamentals.
PAS-C01 scenario practice questions
Practise PAS-C01 questions linked to PAS-C01 scenario.
PAS-C01 troubleshooting practice questions
Practise PAS-C01 questions linked to PAS-C01 troubleshooting.
Practice this exam
Start a free PAS-C01 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this PAS-C01 question test?
Operations and Maintenance — This question tests Operations and Maintenance — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: A custom policy allowing s3:PutObject and s3:ListBucket on the target bucket. — The CodePipeline service role needs permissions to write objects to the S3 bucket and list its contents to verify the upload. A custom policy with s3:PutObject and s3:ListBucket on the target bucket grants exactly these required actions, resolving the 'Access Denied' error during the Deploy stage.
What should I do if I get this PAS-C01 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
This PAS-C01 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 PAS-C01 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.