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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.