diff --git a/API.md b/API.md index daf8083..aa6b0eb 100644 --- a/API.md +++ b/API.md @@ -9294,7 +9294,6 @@ new InvokeLambdaFunctionStep(scope: Construct, id: string, props: InvokeLambdaFu | addToDocument | *No description.* | | listUserOutputs | Lists the outputs defined by the user for this step. | | variables | *No description.* | -| formatInputMap | *No description.* | --- @@ -9356,12 +9355,6 @@ Lists the outputs defined by the user for this step. public variables(): {[ key: string ]: any} ``` -##### `formatInputMap` - -```typescript -public formatInputMap(): {[ key: string ]: any} -``` - #### Static Functions | **Name** | **Description** | diff --git a/src/parent-steps/automation/invoke-lambda-function-step.ts b/src/parent-steps/automation/invoke-lambda-function-step.ts index feba190..4871674 100644 --- a/src/parent-steps/automation/invoke-lambda-function-step.ts +++ b/src/parent-steps/automation/invoke-lambda-function-step.ts @@ -106,14 +106,14 @@ export class InvokeLambdaFunctionStep extends AutomationStep { return super.prepareSsmEntry(entries); } - public formatInputMap(): Record { + private formatInputMap(): Record { return { FunctionName: this.functionName, Qualifier: this.qualifier, InvocationType: this.invocationType, LogType: this.logType, ClientContext: this.clientContext, - Payload: this.payload, + InputPayload: this.payload, }; } } \ No newline at end of file diff --git a/src/simulation/automation/invoke-lambda-function-simulation.ts b/src/simulation/automation/invoke-lambda-function-simulation.ts index 06efc6b..aa75969 100644 --- a/src/simulation/automation/invoke-lambda-function-simulation.ts +++ b/src/simulation/automation/invoke-lambda-function-simulation.ts @@ -26,7 +26,7 @@ export class InvokeLambdaFunctionSimulation extends AutomationSimulationBase { } public executeStep(inputs: Record): Record { - const inputMap = this.invokeLambdaFunctionStep.formatInputMap(); + const inputMap = this.formatInputMap(); const stepInputs = pruneAndTransformRecord(inputMap, x => x.resolve(inputs)); stepInputs.InvocationType = stepInputs.InvocationType ?? 'RequestResponse'; stepInputs.LogType = stepInputs.LogType ?? 'Tail'; @@ -55,4 +55,15 @@ export class InvokeLambdaFunctionSimulation extends AutomationSimulationBase { }; } + private formatInputMap(): Record { + const step = this.invokeLambdaFunctionStep; + return { + FunctionName: step.functionName, + Qualifier: step.qualifier, + InvocationType: step.invocationType, + LogType: step.logType, + ClientContext: step.clientContext, + Payload: step.payload, + }; + } } \ No newline at end of file diff --git a/test/parent-steps/automation/invoke-lambda-function-step.test.ts b/test/parent-steps/automation/invoke-lambda-function-step.test.ts index 6a696d3..9a32b6a 100644 --- a/test/parent-steps/automation/invoke-lambda-function-step.test.ts +++ b/test/parent-steps/automation/invoke-lambda-function-step.test.ts @@ -112,7 +112,7 @@ describe('InvokeLambdaFunctionStep', () => { InvocationType: 'type', LogType: 'none', ClientContext: 'context', - Payload: { a: 1 }, + InputPayload: { a: 1 }, }, name: 'id2', });