You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a parameter that is stored in one account, which contains a comma-separated list needed when running synth in a CDK app in a separate account. I have figured out that had the parameter been present in the same account as the CDK app, I could've used StringParameter.valueFromLookup to make this data available at synth time. I've also noticed that there is another function, StringParameter.fromStringParameterArn, which can be used to retrieve a shared parameter at deploy time. How can I do the combination of these two? I have so far been unable to find a way to resolve a shared parameter at synth time. I really do need this data at synth time, or else I could've resorted to using StringParameter.fromStringParameterArn in combination with a custom resource, but unfortunately that doesn't help me here.
I also looked into calling SSM directly using the AWS SDK for Typescript, but unfortunately that also ended up being a dead end, as the SDK is entirely async, and the CDK doesn't appear to work well with promises.
I feel like the only option I have left is to wrap the CDK in a bash script which first calls the SSM API using the AWS CLI, but that really feels like an ugly workaround for what really feels like something the CDK should support. There is clearly already an intention to support resolving values at synth time, and also an intention to support shared parameter. Is there really no way to do the combination of these two?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have a parameter that is stored in one account, which contains a comma-separated list needed when running synth in a CDK app in a separate account. I have figured out that had the parameter been present in the same account as the CDK app, I could've used
StringParameter.valueFromLookup
to make this data available at synth time. I've also noticed that there is another function,StringParameter.fromStringParameterArn
, which can be used to retrieve a shared parameter at deploy time. How can I do the combination of these two? I have so far been unable to find a way to resolve a shared parameter at synth time. I really do need this data at synth time, or else I could've resorted to usingStringParameter.fromStringParameterArn
in combination with a custom resource, but unfortunately that doesn't help me here.I also looked into calling SSM directly using the AWS SDK for Typescript, but unfortunately that also ended up being a dead end, as the SDK is entirely async, and the CDK doesn't appear to work well with promises.
I feel like the only option I have left is to wrap the CDK in a bash script which first calls the SSM API using the AWS CLI, but that really feels like an ugly workaround for what really feels like something the CDK should support. There is clearly already an intention to support resolving values at synth time, and also an intention to support shared parameter. Is there really no way to do the combination of these two?
Beta Was this translation helpful? Give feedback.
All reactions