Beanstalk Q: What's the difference between a config update and a deployment?

0

I have a PHP application with several ebextension .config files to do things like setup packages, files, etc. And it's composer-based and the app doesn't have a vendor directory, so EB is correctly running composer install to get those dependencies in place. However, I have a some container_commands in my .config files to get some symlinks setup and other files in place or compile css.

When I do a deployment, everything goes great. But if I do a configuration update from the console, the results from the container_commands aren't there, so they don't seem to be run.

Is there a difference between a configuration update and a deployment? And how can I ensure all my steps are done so whenever I do a configuration update, it doesn't break the site since not all the steps were completed?

JPurdy
asked 6 months ago137 views
1 Answer
0
Accepted Answer

Hi, Yes, there is a difference between a configuration update and a deployment in AWS Elastic Beanstalk.

Deployment: This is the process of deploying new application code to your Elastic Beanstalk environment. When you deploy new application code, Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, auto-scaling, and application health monitoring. During the deployment process, Elastic Beanstalk will also execute .ebextensions and container_commands as part of the deployment lifecycle.

Configuration Update: This refers to making changes to the settings of your environment, such as updating the software stack, changing the instance type, or modifying the environment variables. When you perform a configuration update, Elastic Beanstalk will apply those changes to all instances of your application. However, this doesn't trigger a full deployment and therefore will not execute container_commands. container_commands are only run during the application deployment process, not during a configuration update.

This is the reason why you are observing the difference. When a configuration update is done, it doesn't run the container_commands in the .config files and therefore, the results from the container_commands aren't there.

To ensure all steps are run during a configuration update, you might need to manually initiate a deployment after the configuration update. This could be done by creating a new application version and updating the environment to use the new version.

answered 6 months ago
  • Follow up: sometimes EBS does an update that breaks the site that’s restored with a manual deployment. Is there a way to get deployments done automatically when that happens?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions