Courseiva
Question 1,480 of 247
Deployment, Provisioning, and AutomationmediumMultiple ChoiceObjective-mapped

SOA-C02 Deployment, Provisioning, and Automation Practice Question

An administrator is using AWS CodePipeline to deploy a web application. The pipeline includes a build stage using AWS CodeBuild and a deploy stage using AWS Elastic Beanstalk. The build succeeds, but the deployment fails with 'Access Denied' when Elastic Beanstalk tries to read the artifact from S3. What should the administrator check?

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

The IAM role assumed by the Elastic Beanstalk environment

The Elastic Beanstalk environment's IAM service role must have permissions to read the artifact from the S3 bucket. If this role lacks the necessary s3:GetObject permission, the deployment fails with 'Access Denied'. Option B is incorrect because the CodeBuild role handles build tasks, not deployment actions. Option C is incorrect because CodePipeline can manage cross-region artifacts; the region mismatch is unlikely to cause an access-denied error. Option D is incorrect because the artifact bucket is managed by CodePipeline and its bucket policy is typically configured correctly; the issue is more likely with the Elastic Beanstalk service role's permissions.

Answer analysis

Option-by-option breakdown

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

  • The IAM role assumed by the Elastic Beanstalk environment

    Why this is correct

    The Elastic Beanstalk environment uses an IAM service role to interact with other AWS services. To read the artifact from S3, that role must have s3:GetObject permission on the artifact bucket. Denial often indicates the role lacks these permissions.

  • The IAM role used by CodeBuild

    Why it's wrong here

    The CodeBuild IAM role is scoped to the build phase: it grants permissions to pull source code, execute build commands, and push build artifacts to the pipeline's artifact S3 bucket. During deployment, Elastic Beanstalk retrieves the artifact from S3 using its own environment's service role, not the CodeBuild role. An 'Access Denied' error when reading the artifact therefore points to the Elastic Beanstalk role missing s3:GetObject, not to the CodeBuild role's policies. Even if the CodeBuild role were misconfigured, it would fail at the build stage, not during the deploy action.

  • Whether the artifact bucket is in the same region as the pipeline

    Why it's wrong here

    The artifact bucket can reside in a different AWS Region from the pipeline as long as the pipeline's service role and the Elastic Beanstalk environment role have cross-region permissions (e.g., s3:GetObject on the bucket ARN). A region mismatch alone would not produce an 'Access Denied' error; it would instead cause a different symptom like a 'Cannot access S3 object' timeout or an S3 bucket not found error. The error here is an authorization failure, meaning the request reached S3 but the principal lacked the required permission. Thus, the root cause is the Elastic Beanstalk environment's IAM role, not the bucket's region.

  • The S3 bucket policy for the artifact bucket

    Why it's wrong here

    The artifact bucket is managed by AWS CodePipeline, and its bucket policy typically allows access to the pipeline's service role. However, the error arises from the Elastic Beanstalk role lacking permissions, not from an overly restrictive bucket policy.

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 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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 20, 2026

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.

Loading comments…

Sign in to join the discussion.

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