What is the point of cdk-context. I just confused...
# sst
t
What is the point of cdk-context. I just confused myself for 30min because I was wondering why
ssm.valueFromLookup
was giving an old value and it's because it was cached in cdk-context. Doesn't see to be a way to override this
f
cdk-context is how CDK caches certain configurations about the build process. For example, if you use are setting up an VPC, when you first deployed, ur AWS region had 4 availability zones, CDK remembers that by adding that information to the context. At some point in the future, if AWS adds a new zone to ur region, CDK will continue to use the same 4 zones. So no new subnet being created, etc.
That said, I nvr used
ssm.valueFromLookup
, any time you see
xxxxFromLookup
, the value is resolved at build time. Can you try using
ssm.fromStringParameterName
?
t
ah that makes sense. yeah let me give that a whirl