Deploy war from S3 to AWS Elastic Beanstalk

扶醉桌前 提交于 2019-12-03 06:53:16
thekosmix

I have got the best answer in this post :

it requires 3 simple steps using AWS CLI:

  1. Upload to S3 bucket: aws s3 cp /var/lib/tomcat7/webapps/ROOT.war s3://elasticbeanstalk-ap-southeast-1-xxxxxx/myROOT.war
  2. Create application version: aws elasticbeanstalk create-application-version --application-name your_app_name --version-label your_version_label --source-bundle S3Bucket=elasticbeanstalk-ap-southeast-1-xxxxxx,S3Key=myROOT.war
  3. Update your environment: aws elasticbeanstalk update-environment --environment-name your_environment_name --version-label your_version_label

I have created a bash script, which takes just 3 seconds for all the above steps. Do go through the link for more descriptive answer.

If your s3 war file is in mybucket/test/myapp.war then creating an application version with the s3 bucket as mybucket and test/myapp.war is the way to do it. Not sure why you are getting the VPC related error. When and where do you see that error? When you create an application version or when you create an environment? Does the API call throw the error message immediately do you see that in the events later?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!