Deploy to AWS Elastic Beanstalk An example script for deploying a new version of an application to an existing AWS Elastic Beanstalk application with Bitbucket Pipelines.

How To Use It

- Optional: Create a new AWS Elastic Beanstalk application using the Cloudfromation script https://bitbucket.org/overdrive/procon8/src/a6bbf489b48f9b57f7159f7192d121442caa495a/elasticbeanstalk.json Add the required Environment Variables below. 
- Copy beanstalk_deploy.py to your project. 
- Copy bitbucket-pipelines.yml to your project. Or use your own, just be sure to include all steps in the yml file. 
- Copy the test folder to your project if you would like to try this using a test application. 
	It is recommended you create a separate user account used for this deploy process. 
	This user should be associated with a group that has the AWSElasticBeanstalkFullAccess AWS managed policy attached for the required permissions to execute a new deployment to AWS Elastic Beanstalk.
Note that the permissions should limit the access to just the AWS resources in your context.

Required Environment Variables

- AWS_SECRET_ACCESS_KEY: Secret key for a user with the required permissions. 
- AWS_ACCESS_KEY_ID: Access key for a user with the required permissions. 
- AWS_DEFAULT_REGION: Region where the target Elastic Beanstalk application is. 
 -APPLICATION_NAME: Name of the target Elastic Beanstalk application. 
- APPLICATION_ENVIRONMENT: Name of the Elastic Beanstalk environment you are deploying to. 
- S3_BUCKET: Name of the S3 Bucket where application versions for the Elastic Beanstalk application are stored. 

AWS Elastic Beanstalk will create a bucket in the region automatically with a name like elasticbeanstalk-us-west-2-YOUR_ACCOUNT_NUMBER. You can use this bucket to upload your application source or create your own.