Skip to content
Discussion options

You must be logged in to vote

Answer: CloudFormation doesn't allow you to reference an array value returned by a custom resource - you have to specify the specific indeces in the array that you want to reference. So unfortunately, if you want to feed it into an array, you will need to create that array in code, and specify each exact property you need. If this list is of an arbitrary length, you'll want to implement your own script which fetches the context you need instead of using a custom resource. See Commit cdk.context.json for more information:

If you need some value (from AWS or elsewhere) for which there is no native CDK context provider, we recommend writing a separate script. The script should retrieve the v…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@github-actions
Comment options

Answer selected by github-actions
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants