We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In AWS CLI v2, using PutRestApi to update API via a JSON Swagger file would end up an Invalid Base64 error.
PutRestApi
Invalid Base64
With --debug parameter turned on, here are what happened:
--debug
2020-03-09 22:54:30,811 - MainThread - botocore.endpoint - DEBUG - Setting apigateway timeout as (60, 60) 2020-03-09 22:54:30,813 - MainThread - botocore.hooks - DEBUG - Event provide-client-params.api-gateway.PutRestApi: calling handler <function base64_decode_input_blobs at 0x108875e50> 2020-03-09 22:54:30,813 - MainThread - awscli.clidriver - DEBUG - Exception caught in main() Traceback (most recent call last): File "/usr/local/Cellar/awscli/2.0.0/libexec/lib/python3.8/site-packages/awscli/customizations/binaryformat.py", line 59, in _visit_scalar parent[name] = base64.b64decode(value) File "/usr/local/Cellar/awscli/2.0.0/libexec/lib/python3.8/base64.py", line 87, in b64decode return binascii.a2b_base64(s) binascii.Error: Incorrect padding During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/Cellar/awscli/2.0.0/libexec/lib/python3.8/site-packages/awscli/clidriver.py", line 335, in main return command_table[parsed_args.command](remaining, parsed_args)`
It seems to me that AWS CLI v2 does not transform the JSON payload to Base64. This issue would not happened on AWS CLI v1.
This issue would be resolved if I use another command to encode the JSON payload to Base64 and put that after the --body parameter.
--body
The text was updated successfully, but these errors were encountered:
Hi @starkshaw, this seems to be a duplicate of some other customer feedback. You can learn more about this change in our V1-V2 breaking changes doc.
Also check out some other issues: #5011 #4994 #4978 https://github.com/aws/aws-cli/pull/4981/files
Sorry, something went wrong.
Thanks!
klaytaybai
No branches or pull requests
In AWS CLI v2, using
PutRestApi
to update API via a JSON Swagger file would end up anInvalid Base64
error.With
--debug
parameter turned on, here are what happened:It seems to me that AWS CLI v2 does not transform the JSON payload to Base64. This issue would not happened on AWS CLI v1.
This issue would be resolved if I use another command to encode the JSON payload to Base64 and put that after the
--body
parameter.The text was updated successfully, but these errors were encountered: