Remediation
Enable Managed Platform Updates the Elastic Beanstalk Environmentβ
Managed platform updates allow Elastic Beanstalk to automatically apply platform updates during a defined maintenance window using an immutable deployment strategy, helping ensure availability and safe rollback in the event of a failure.
From Command Lineβ
Run the update-environment command to enable managed platform updates and configure the maintenance window and update behavior for the selected environment:
aws elasticbeanstalk update-environment \
--region {{region}} \
--environment-name {{environment-name}} \
--option-settings \
Namespace=aws:elasticbeanstalk:managedactions,OptionName=ManagedActionsEnabled,Value=true \
Namespace=aws:elasticbeanstalk:managedactions,OptionName=PreferredStartTime,Value={{day:hour:minute}} \
Namespace=aws:elasticbeanstalk:managedactions,OptionName=ServiceRoleForManagedUpdates,Value={{ServiceRole}} \
Namespace=aws:elasticbeanstalk:managedactions:platformupdate,OptionName=UpdateLevel,Value={{major | minor | patch}} \
Namespace=aws:elasticbeanstalk:managedactions:platformupdate,OptionName=InstanceRefreshEnabled,Value={{true | false}}
Considerationsβ
PreferredStartTimedefines the weekly maintenance window in the formatDAY:HH:MM(UTC). For example,Tue:09:00.ServiceRoleForManagedUpdatesmust reference an IAM role with the required permissions for Elastic Beanstalk managed actions. You can use either the same role that you specified for theServiceRoleoption of theaws:elasticbeanstalk:environmentnamespace, or your account's managed updates service-linked role.UpdateLevelcontrols the scope of platform updates applied (major, minor, or patch).InstanceRefreshEnableddetermines whether weekly instance replacement is enabled.