Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.3K
Visualizações
How to upload and deploy zip file to AWS elastic beanstalk via CLI?

I do not want to use the console. No manual processes. I need a command line version, something that I can code in my continuous deployment scripts.

As part of the build process, I can output a ZIP file (be it on my local machine or in CI process, e.g: via bitbucket pipelines or AWS codedeploy VM instance).

I want a command like:

aws eb deploy my-app ./server.zip

That is, first upload my chosen zip file and then deploy it (doesn't have to be one command).

The official eb deploy does not seem to support this, nor have I been able to find any other method to do this.

Any ideas would be much appreciated :)

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I don't think eb CLI supports uploading a ZIP and updating an environment but you can use a combination of AWS CLI commands.

  1. Upload the ZIP to S3
  2. Create an application version
  3. Update the environment

Example,

aws s3 cp deploy.zip s3://mybucket/deploy.zip
aws elasticbeanstalk create-application-version --application-name my-app --version-label 12345 --source-bundle S3Bucket="mybucket",S3Key="deploy.zip"
aws elasticbeanstalk update-environment --application-name my-app --environment-name MyApp-env --version-label 12345
over 4 years ago · Santiago Trujillo Relatório

0

I was looking for this answer as well. I was able to find some AWS documentation that lets you use the Elastic Beanstalk CLI configuration to upload the zip.

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html#eb-cli3-artifact

Deploying an artifact instead of the project folder

You can tell the EB CLI to deploy a ZIP file or WAR file that you generate as part of a separate build process by adding the following lines to .elasticbeanstalk/config.yml in your project folder.

deploy:
 artifact: path/to/buildartifact.zip

If you configure the EB CLI in your Git repository, and you don't > commit the artifact to source, use the --staged option to deploy the latest build.

~/eb$ eb deploy --staged

I tested and it did work for me!

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda