2

I have created a pipeline for code deployment with github, but it is failing at DownloadBundle with Access Denied error.

I have created a role with AmazonEC2FullAccess and AWSCodeDeployRole to the deployment iam and also crated role for ec2 AmazonEC2FullAccess I have attached couple of screenshot for setting of code deployment group also I have placed appspec.yml in the root directory of my repo.

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html/
    overwrite: true
file_exists_behavior: OVERWRITE
hooks:
  BeforeInstall:
    - location: scripts/install_dependencies.sh
      timeout: 300
      runas: root
  ApplicationStart:
    - location: scripts/start_server.sh
      timeout: 300
      runas: root

enter image description here enter image description here

Note: I am using Auto scaling

1 Answer 1

1

For this purpose your EC2 instance has to access S3 as well, check if your EC2 instance has permission to access the related S3 Bucket. Also if you are using KMS for encryption of your bucket, your EC2 instance has to have KMS permissions as well.

Sign up to request clarification or add additional context in comments.

3 Comments

ohh, yah I didn't given permission for S3. thanks for the help
My pleasure! @ChiragSModi
but now the error coming on AllowTraffic, the error code is showing ScriptFailed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.