ec2: MachineImages that use SSM queries get unwantedly replaced on deployments #5675
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
docs/inline
Related to inline documentation of the API Reference
feature-request
A feature should be added or improved.
guidance
Question that needs advice or information.
in-progress
This issue is being actively worked on.
p2
General Issue
I currently have a CDK project with many stacks in them and the issue I am having is I have one stack that is a generic load balancer shared between applications and the other is an EC2 instance that is accessed through the load balancer. I am making a change to the load balancer but the CDK deploy function seems to run the deploy on any stacks that have resources referenced by my load balancer stack. The EC2 instance stack has no changes and when I run cdk diff on that stack it shows no changes but when I run deploy on the EC2 stack or on the load balancer stack which runs deploy on the EC2 stack it detects the AMI for the latest version of windows is different and tries to replace my instance. The issue is I deployed the EC2 stack back in November which for my region used AMI
ami-07d23537f44fe67c1
but now the latest version in my region isami-06eed5c2539ba3e74
. I am using theca-central-1
region.I feel like this is a bug as I can't see why an EC2 instance should be replaced after deployment just because the latest AMI was updated.
Environment
The text was updated successfully, but these errors were encountered: