Skip to content

Updating ElasticBeanstalk Parameter Store Environment ignores Immutable update configuration

0

After updating or adding environment value to ElasticBeanstalk that is of source Parameter Store the EB tries to update running servers despite having Rolling update type and Deployment policy set to Immutable.

If there is also Plain text source environment variable changed (added, updated, removed) the EB correctly follows Immutable policy and starts new servers. Is this a bug in behavior or do we miss something?

Because we indeed want immutability even for those changes instead of EB blowing up running instances. Is there a way to force creating new instances without using some placeholder plain text env?

1 Answer
0

This behavior is expected rather than a bug. There's a distinction between how Elastic Beanstalk handles different types of configuration changes.

When you modify configuration settings that require changes to the launch configuration or VPC settings, Elastic Beanstalk must terminate and replace all instances. For these types of changes, your immutable update policy settings (both Rolling Update Type and Deployment Policy) will be applied.

However, when you're only updating environment variables that are sourced from Parameter Store, Elastic Beanstalk can apply these changes without requiring instance replacement. Since Parameter Store values are dynamically referenced rather than baked into the launch configuration, Elastic Beanstalk can update the running instances without needing to create new ones.

This explains the behavior difference you're seeing:

  • When you change Parameter Store environment variables only: Updates are applied to existing instances
  • When you change plain text environment variables: This requires an immutable update with new instances

The immutable update settings are only applied when Elastic Beanstalk needs to replace instances, which isn't necessary for Parameter Store variable changes alone.
Sources
Configuration changes - AWS Elastic Beanstalk
Is there a difference between aws:autoscaling:updatepolicy:rollingupdate:RollingUpdateType:Immutable and aws:elasticbeanstalk:command:DeploymentPolicy:Immutable? | AWS re:Post

answered a year ago

AWS
EXPERT

reviewed 10 months ago

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.