How to deploy to EC2 instance , from a .zip file i

2019-08-23 12:22发布

问题:

I have a PHP application zipped and uploaded to a S3 bucket. Now I have created a version of that zip using

aws elasticbeanstalk create-application-version --application-name <app-name> 
--version-label project1 --source-bundle S3Bucket=elasticbeanstalk-
automator,S3Key=project1.zip --region ap-southeast-1

After the version is created should I use eb cli, or how should I deploy the zip to an EC2 environment?

回答1:

Updating the AWS elastic beanstalk environment with environment name, application name, and version label will deploy the application:

aws elasticbeanstalk update-environment --application-name <your-app-name>  --
environment-name <environment-name-to-deploy>   --version-label <version-
label-to-deploy>