aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

aws-ssm: CloudFormation failing to update custom resource that references ssm SendCommandCommand

Open tdq132 opened this issue 3 years ago • 3 comments

Describe the bug

When adding in a custom resource that calls SSM SendCommandCommand, somewhere, this is being translated to SendCommandCommandCommand (i.e. an extra Command is being appended to the SDK call).

In my cdk.out, I can see the custom resource with sendCommandCommand, as intended.

On CloudFormation deploy, the custom resource fails to deploy with error: Received response status [FAILED] from custom resource. Message returned: Unable to find command named: SendCommandCommandCommand for action: SendCommandCommand in service package @aws-sdk/client-ssm

Expected Behavior

I expect the custom resource to call SSM SendCommandCommand, which is the correct SDK call.

Current Behavior

Custom resource calling SSM SendCommandCommand is being rewritten to SendCommandCommandCommand which is nonexiestent in the AWS SDK JS v3 library.

Reproduction Steps

custom_resources.AwsSdkCall(
    action="sendCommandCommand",
    service="SSM",
    parameters=send_command_parameters,
    physical_resource_id=custom_resources.PhysicalResourceId.of(
        f"{document}{instance}"
    ),
    output_paths=["Command.CommandId"],
)

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.103.1 (build 3bb19ac)

Framework Version

No response

Node.js Version

v20.6.1

OS

Ubuntu 23.04

Language

Python

Language Version

Python 3.11.4

Other information

No response

tdq132 avatar Nov 02 '23 04:11 tdq132

According to the doc, have you tried this in the latest AWS CDK release?

service: 'ssm',
action: 'sendCommand',

pahud avatar Nov 10 '23 18:11 pahud

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] avatar Nov 12 '23 20:11 github-actions[bot]

Yes, sendCommand works, but this does not explain why it has changed from sendCommand, to sendCommandCommand, and now back to sendCommand.

tdq132 avatar Nov 14 '23 02:11 tdq132