class LambdaInvokeAction
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CodePipeline.Actions.LambdaInvokeAction |
Java | software.amazon.awscdk.services.codepipeline.actions.LambdaInvokeAction |
Python | aws_cdk.aws_codepipeline_actions.LambdaInvokeAction |
TypeScript (source) | @aws-cdk/aws-codepipeline-actions » LambdaInvokeAction |
Implements
IAction
Extends
Action
CodePipeline invoke Action that is provided by an AWS Lambda function.
See also: https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html
Example
declare const fn: lambda.Function;
const sourceOutput = new codepipeline.Artifact();
const buildOutput = new codepipeline.Artifact();
const lambdaAction = new codepipeline_actions.LambdaInvokeAction({
actionName: 'Lambda',
inputs: [
sourceOutput,
buildOutput,
],
outputs: [
new codepipeline.Artifact('Out1'),
new codepipeline.Artifact('Out2'),
],
lambda: fn,
});
Initializer
new LambdaInvokeAction(props: LambdaInvokeActionProps)
Parameters
- props
LambdaInvoke Action Props
Properties
| Name | Type | Description |
|---|---|---|
| action | Action | The simple properties of the Action, like its Owner, name, etc. |
actionProperties
Type:
Action
The simple properties of the Action, like its Owner, name, etc.
Note that this accessor will be called before the {@link bind} callback.
Methods
| Name | Description |
|---|---|
| bind(scope, stage, options) | The callback invoked when this Action is added to a Pipeline. |
| on | Creates an Event that will be triggered whenever the state of this Action changes. |
| variable(variableName) | Reference a CodePipeline variable defined by the Lambda function this action points to. |
| protected bound(scope, _stage, options) | This is a renamed version of the {@link IAction.bind} method. |
bind(scope, stage, options)
public bind(scope: Construct, stage: IStage, options: ActionBindOptions): ActionConfig
Parameters
- scope
Construct - stage
IStage - options
ActionBind Options
Returns
The callback invoked when this Action is added to a Pipeline.
onStateChange(name, target?, options?)
public onStateChange(name: string, target?: IRuleTarget, options?: RuleProps): Rule
Parameters
- name
string - target
IRuleTarget - options
RuleProps
Returns
Creates an Event that will be triggered whenever the state of this Action changes.
variable(variableName)
public variable(variableName: string): string
Parameters
- variableName
string— the name of the variable to reference.
Returns
string
Reference a CodePipeline variable defined by the Lambda function this action points to.
Variables in Lambda invoke actions are defined by calling the PutJobSuccessResult CodePipeline API call with the 'outputVariables' property filled.
See also: https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PutJobSuccessResult.html
protected bound(scope, _stage, options)
protected bound(scope: Construct, _stage: IStage, options: ActionBindOptions): ActionConfig
Parameters
- scope
Construct - _stage
IStage - options
ActionBind Options
Returns
This is a renamed version of the {@link IAction.bind} method.

.NET
Java
Python
TypeScript (