Forums

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

Deploy node JS rest api to elastic beanstalk using bitbucket pipeline

Mohammad Tofi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 28, 2019

I use bitbucket pipeline to deploy node js sample code to the elastic beanstalk, but I always face a problem "calling the CreateApplicationVersion operation: No Application named MYAPP" so I have that elastic beanstalk app in my AWS account.

Can you please give me a clear document on how to deploy code using bitbucket pipeline on elastic beanstalk for node js app.

 

I use bitbucket-pipelines.yml:

image: atlassian/default-image:2
pipelines:
default:
-
step:
name: "Build and Test"
script:
-
zip application.zip Dockerfile application.py cron.yaml Dockerrun.aws.json
artifacts:
-
application.zip
-
step:
name: "Deploy to Production" deployment: production
script:
- pipe:
atlassian/aws-elasticbeanstalk-deploy:0.2.5
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
APPLICATION_NAME: $APPLICATION_NAME
ZIP_FILE: "application.zip"
S3_BUCKET: $S3_BUCKET
VERSION_LABEL: "deploy-$BITBUCKET_BUILD_NUMBER-O"
ENVIRONMENT_NAME: $APPLICATION_ENVIRONMENT

 

1 answer

1 vote
Alexander Zhukov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 26, 2019

Hi @Mohammad Tofi ! One of the most frequent reasons that case this kind of errors is that people use different region when running the pipe. I'd double check that the regions selected in the AWS Console is the same you use as your  $AWS_DEFAULT_REGION. Here is a deployment guide for deploying to AWS ElasticBeanstalk that should also help you to use pipelines to deploy to AWS https://confluence.atlassian.com/bitbucket/deploy-to-amazon-aws-875304040.html#DeploytoAmazonAWS-DeploytoAWSwithElasticBeanstalk. Hope that helps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events