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:
- Upload to S3 bucket: aws s3 cp /var/lib/tomcat7/webapps/ROOT.war s3://elasticbeanstalk-ap-southeast-1-xxxxxx/myROOT.war
- 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
- 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.