aws / aws/aws-cdk

SSM - parameter path and value changes are not updated in the stack.

Open
#7,722 11 comments 14 reactions 0 assignees View on GitHub
@aws-cdk/aws-ssm bug effort/small p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

There are two ways of resolving ssm parameters (as long as it isn't a secure parameter):
1. `ssm.StringParameter.valueForStringParameter`
2. `ssm.StringParameter.fromStringParameterAttributes`

They behave differently, but according to the documentation I would expect them to behave the same.

1. Test by changing paths
ie: change the SSM path from one deployment to the next.
Retrieving by value does what I expect - it updates values when the path changes.
Retrieving by attributes does not. The value in the stack will not change.

2. Test by changing values
it doesn't matter what we change, the values in the stack do not change.

### Reproduction Steps

https://github.com/brettswift/cdk-ssm-test

follow the README.md

shell scripts are there to demonstrate everything.

### Environment

- **CLI Version :**1.36.1
- **Framework Version:**
- **OS :**OSX
- **Language :**typescript

---

This is :bug: Bug Report

Contributor guide

Open the contributing guide

Research direction

Start with the linked reproduction's README.md and shell scripts, then compare ssm.StringParameter.valueForStringParameter with ssm.StringParameter.fromStringParameterAttributes. Reproduce deployments with changed paths and values; done means both approaches update the stack consistently when the referenced SSM parameter changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.