aws-cdk-lib.aws_codepipeline_actions.LambdaInvokeActionProps

interface LambdaInvokeActionProps

LanguageType name
.NETAmazon.CDK.AWS.CodePipeline.Actions.LambdaInvokeActionProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodepipelineactions#LambdaInvokeActionProps
Javasoftware.amazon.awscdk.services.codepipeline.actions.LambdaInvokeActionProps
Pythonaws_cdk.aws_codepipeline_actions.LambdaInvokeActionProps
TypeScript (source)aws-cdk-lib » aws_codepipeline_actions » LambdaInvokeActionProps

Construction properties of the LambdaInvokeAction Lambda invoke CodePipeline Action.

Example

declare const fn: lambda.Function;
const pipeline = new codepipeline.Pipeline(this, 'MyPipeline');
const lambdaAction = new codepipeline_actions.LambdaInvokeAction({
  actionName: 'Lambda',
  lambda: fn,
});
pipeline.addStage({
  stageName: 'Lambda',
  actions: [lambdaAction],
});

Properties

NameTypeDescription
actionNamestringThe physical, human-readable name of the Action.
lambdaIFunctionThe lambda function to invoke.
inputs?Artifact[]The optional input Artifacts of the Action.
outputs?Artifact[]The optional names of the output Artifacts of the Action.
role?IRoleThe Role in which context's this Action will be executing in.
runOrder?numberThe runOrder property for this Action.
userParameters?{ [string]: any }A set of key-value pairs that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with.
userParametersString?stringThe string representation of the user parameters that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with.
variablesNamespace?stringThe name of the namespace to use for variables emitted by this action.

actionName

Type: string

The physical, human-readable name of the Action.

Note that Action names must be unique within a single Stage.


lambda

Type: IFunction

The lambda function to invoke.


inputs?

Type: Artifact[] (optional, default: the Action will not have any inputs)

The optional input Artifacts of the Action.

A Lambda Action can have up to 5 inputs. The inputs will appear in the event passed to the Lambda, under the 'CodePipeline.job'.data.inputArtifacts path.

See also: https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html#actions-invoke-lambda-function-json-event-example


outputs?

Type: Artifact[] (optional, default: the Action will not have any outputs)

The optional names of the output Artifacts of the Action.

A Lambda Action can have up to 5 outputs. The outputs will appear in the event passed to the Lambda, under the 'CodePipeline.job'.data.outputArtifacts path. It is the responsibility of the Lambda to upload ZIP files with the Artifact contents to the provided locations.


role?

Type: IRole (optional, default: a new Role will be generated)

The Role in which context's this Action will be executing in.

The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your IAction.bind method in the ActionBindOptions.role property.


runOrder?

Type: number (optional, default: 1)

The runOrder property for this Action.

RunOrder determines the relative order in which multiple Actions in the same Stage execute.

See also: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html


userParameters?

Type: { [string]: any } (optional, default: no user parameters will be passed)

A set of key-value pairs that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with.

Only one of userParameters or userParametersString can be specified.

See also: https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html#actions-invoke-lambda-function-json-event-example


userParametersString?

Type: string (optional, default: no user parameters will be passed)

The string representation of the user parameters that will be accessible to the invoked Lambda inside the event that the Pipeline will call it with.

Only one of userParametersString or userParameters can be specified.


variablesNamespace?

Type: string (optional, default: a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set)

The name of the namespace to use for variables emitted by this action.