Reputation: 419
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
Note: I am using Auto scaling
Upvotes: 2
Views: 238
Reputation: 224
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.
Upvotes: 1