Describe the bug
Got the error when running the example in the awscli/examples/apigatewaymanagementapi/post-to-connection.rst
aws apigatewaymanagementapi post-to-connection --connection-id L0SM9cOFvHcCIhw= --data "Hello from API Gateway!" --endpoint-url https://aabbccddee.execute-api.us-west-2.amazonaws.com/prod
Invalid base64: "Hello from API Gateway!"
Expected Behavior
Could not connect to the endpoint URL:"https://aabbccddee.execute-api.us-west-2.amazonaws.com/prod/@connections/L0SM9cOFvHcCIhw%3D"
Current Behavior
aws apigatewaymanagementapi post-to-connection --connection-id L0SM9cOFvHcCIhw= --data "Hello from API Gateway!" --endpoint-url https://aabbccddee.execute-api.us-west-2.amazonaws.com/prod
Invalid base64: "Hello from API Gateway!"
Reproduction Steps
Run the cmd
aws --version
aws-cli/2.1.18
aws apigatewaymanagementapi post-to-connection --connection-id L0SM9cOFvHcCIhw= --data "Hello from API Gateway!" --endpoint-url https://aabbccddee.execute-api.us-west-2.amazonaws.com/prod
Invalid base64: "Hello from API Gateway!"
Possible Solution
It worked after adding the "--cli-binary-format".
aws apigatewaymanagementapi post-to-connection --connection-id L0SM9cOFvHcCIhw= --cli-binary-format raw-in-base64-out --data "Hello from API Gateway!" --endpoint-url https://aabbccddee.execute-api.us-west-2.amazonaws.com/prod
Could not connect to the endpoint URL: "https://aabbccddee.execute-api.us-west-2.amazonaws.com/prod/@connections/L0SM9cOFvHcCIhw%3D
Additional Information/Context
No response
CLI version used
aws-cli/2.1.18 Python/3.7.3
Environment details (OS name and version, etc.)
Linux/5.10.102.1-microsoft-standard-WSL2 exe/x86_64.ubuntu.20 prompt/off
Describe the bug
Got the error when running the example in the awscli/examples/apigatewaymanagementapi/post-to-connection.rst
aws apigatewaymanagementapi post-to-connection --connection-id L0SM9cOFvHcCIhw= --data "Hello from API Gateway!" --endpoint-url https://aabbccddee.execute-api.us-west-2.amazonaws.com/prodInvalid base64: "Hello from API Gateway!"Expected Behavior
Could not connect to the endpoint URL:"https://aabbccddee.execute-api.us-west-2.amazonaws.com/prod/@connections/L0SM9cOFvHcCIhw%3D"Current Behavior
aws apigatewaymanagementapi post-to-connection --connection-id L0SM9cOFvHcCIhw= --data "Hello from API Gateway!" --endpoint-url https://aabbccddee.execute-api.us-west-2.amazonaws.com/prodInvalid base64: "Hello from API Gateway!"Reproduction Steps
Run the cmd
aws --versionaws-cli/2.1.18aws apigatewaymanagementapi post-to-connection --connection-id L0SM9cOFvHcCIhw= --data "Hello from API Gateway!" --endpoint-url https://aabbccddee.execute-api.us-west-2.amazonaws.com/prodInvalid base64: "Hello from API Gateway!"Possible Solution
It worked after adding the "--cli-binary-format".
aws apigatewaymanagementapi post-to-connection --connection-id L0SM9cOFvHcCIhw= --cli-binary-format raw-in-base64-out --data "Hello from API Gateway!" --endpoint-url https://aabbccddee.execute-api.us-west-2.amazonaws.com/prodCould not connect to the endpoint URL: "https://aabbccddee.execute-api.us-west-2.amazonaws.com/prod/@connections/L0SM9cOFvHcCIhw%3DAdditional Information/Context
No response
CLI version used
aws-cli/2.1.18 Python/3.7.3
Environment details (OS name and version, etc.)
Linux/5.10.102.1-microsoft-standard-WSL2 exe/x86_64.ubuntu.20 prompt/off