Deploy war from S3 to AWS Elastic Beanstalk

http://stackoverflow.com/questions/25683649/deploy-war-from-s3-to-aws-elastic-beanstalk

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-nameyour_app_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.

原文地址:https://www.cnblogs.com/ycliu912/p/5455710.html