Including automatically resolved stack outputs in LambdaInvokeAction for CDK Pipelines #15707
Closed
PeterBaker0
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When creating a CdkPipeline and adding stages, the ShellScriptAction stage has the helpful optional field
use_outputs
which allows a mapping of key words toStackOutput
which are automatically resolved at the time of theShellScriptAction
running and are available as environment variables as we expect in the rest of the CDK Lambda workflow.Upon trying to add a
LambdaInvokeAction
to the pipeline from theaws_codepipeline_actions
package, I see that there is the option foruser_parameters
,inputs
andoutputs
(artifacts) but no direct equivalent. It seems that user_parameters are statically defined at the time of synthesis for the pipeline stack and when read inside the Lambda function are not resolved to their values.It seems that there is some guidance here about how to manually pull the zip files from the relevant artefact s3 bucket, however this really breaks the workflow that CDK usually provides.
Is there an equivalent, or something closer, to the kindness of just being able to throw in StackOutputs from the
pipeline.stack_output
function directly into environment variables for a LambdaInvokeAction?If not, I think this could be a valuable feature.
Beta Was this translation helpful? Give feedback.
All reactions