Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket Pipelines using AWS CodeDeploy the deployment step has failed.

rao999 July 18, 2019

Hi Team,

I am facing the issue of with pipeline, as there are 3 steps 2 are working fine, the last one aws code deploy isnt working , while deployment its having issue.

Also I have a question that the artifact which is going to s3, from there how aws code deploy will recognize my path, my path is /var/www/html

here is codes : and the screenshots 

 

Please help me :(Capture0.PNGCapture01.PNGCapture02.PNG

 

image: node:10.15.0

pipelines:
default:
- step:
name: Build
script:
- apt-get update -y
- cd admin/front-end/
- npm install
- CI=false
- npm run build
- apt-get install -y zip
- zip -r myapp.zip *
artifacts:
- admin/front-end/myapp.zip

- step:
name: Upload to S3
script:
- pipe: atlassian/aws-code-deploy:0.2.3
variables:
AWS_DEFAULT_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: 'AKIAXWJT4X2UTL2URGQJ'
AWS_SECRET_ACCESS_KEY: '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'
COMMAND: 'upload'
APPLICATION_NAME: 'codedeployapplication'
ZIP_FILE: 'admin/front-end/myapp.zip'
S3_BUCKET: 'codedeployrole'
VERSION_LABEL: 'my-app-1.0.0'

- step:
name: Deploy with CodeDeploy
services:
- docker
script:
- pipe: atlassian/aws-code-deploy:0.2.6
variables:
AWS_DEFAULT_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: 'AKIAXWJT4X2UTL2URGQJ'
AWS_SECRET_ACCESS_KEY: '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'
COMMAND: 'deploy'
APPLICATION_NAME: 'codedeployapplication'
DEPLOYMENT_GROUP: 'DG1'
WAIT: 'true'
S3_BUCKET: 'codedeployrole'
VERSION_LABEL: 'my-app-1.0.0'
IGNORE_APPLICATION_STOP_FAILURES: 'true'
FILE_EXISTS_BEHAVIOR: 'OVERWRITE'

 

 

1 answer

0 votes
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 12, 2019

Hey @rao999 . On the last screenshot I can see that the error code is HEALTH_CONSTRAINTS, which means that code deploy is having issues to deploy your code to EC2 instances. I would first check the following:

  • networking (firewall, security group is denying the traffic, ssh protocol is blocked, no route to the internet gateway if you are using a VPC)
  • CodeDeploy agent is not installed/running on your instance

Some useful links:

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events