i'm new using git with eb cli, for deploy my code to aws elastic beanstalk. I though the most vantage thing on eb cli was deploy specific files (from commit), but every time i commit some files and deploy my application, eb cli zip all project and this is too much for upload all the time. Please help me, i read almost everything about it on aws documentation and there's nothign about it. Thanks!
Description. Deploys the application source bundle from the initialized project directory to the running application. If git is installed, EB CLI uses the git archive command to create a . zip file from the contents of the most recent git commit command.
When you use the AWS Elastic Beanstalk console to deploy a new application or an application version, you'll need to upload a source bundle. Your source bundle must meet the following requirements: Consist of a single ZIP file or WAR file (you can include multiple WAR files inside your ZIP file) Not exceed 512 MB.
To maintain full capacity during deployments, you can configure your environment to launch a new batch of instances before taking any instances out of service. This option is known as a rolling deployment with an additional batch.
If you want to further customize your deployment and not just deploy your current branch; I believe you're going to have to manually specify an artifact yourself and build the zip yourself before calling eb deploy
.
In your .elasticbeanstalk/config.yml
:
deploy:
artifact: some-custom-zip.zip
The artifact should exist in the same directory as the .elasticbeanstalk
directory.
And you could create a bash script to generate your own custom zip file for uploading use before calling eb deploy or use a Makefile.
Example Makefile:
some-custom-zip.zip: something.py another.py
zip $@ something.py another.py
deploy: some-custom-zip.zip
eb deploy
.PHONY: deploy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With