Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CLI V2 "AWS firehose put-record" complaining about Invalid base64:

I have used to be able to send a record to firehose without any problem like this

aws firehose put-record --delivery-stream-name my-stream --record='Data="{\"foor\":\"bar\"}"'

But since I have updated my cli to version 2 I am getting this error:

Invalid base64: "{"foor":"bar"}"

I have tried to convert {"foor":"bar"} to based64 but then I got InvalidArgumentException

aws firehose put-record --delivery-stream-name my-stream --record='Data=e1wiYXNkZlwiOlwidGVzdGFtXCJ9Ig=='


An error occurred (InvalidArgumentException) when calling the PutRecord operation: This operation is not permitted on KinesisStreamAsSource delivery stream type.
like image 682
Am1rr3zA Avatar asked Jul 08 '20 21:07

Am1rr3zA


1 Answers

In My case, I was using Kinesis via Windows Powershell CLI.

aws kinesis put-record --stream-name First-Kinesis --data "Sign In" --partition-key user222 --cli-binary-format raw-in-base64-out

Adding below cofiguration resolved my issue.

--cli-binary-format raw-in-base64-out

I hope this helps your purpose.

like image 92
vijayraj34 Avatar answered Nov 10 '22 13:11

vijayraj34