Getting an AmazonKinesisException Status Code: 502 when using LocalStack from Java

前端 未结 1 1001
被撕碎了的回忆
被撕碎了的回忆 2021-01-21 19:27

I\'m writing integration tests using LocalStack to mock out my calls to Kinesis. I\'ve created a Kinesis client, but when I try to put records on Kinesis I get an error:

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-21 20:10

    I had a similar issue while connecting Kinesis over localstack locally. I was using the v2 SDK java library.

    Root cause

    By default, kinesalite doesn't support CBOR and should be disabled to make it run. Internet is flooded with flags to disable CBOR but none of them worked for me.

    You have to do two things:

    1. Set environment var AWS_CBOR_DISABLE=true to tell localstack to stop using
    2. Set environment var aws.cborEnabled=false to tell AWS SDK to stop using it.

    In my case, I was stuck with the SDK flag which is referred in software.amazon.awssdk.core.SdkSystemSetting

    0 讨论(0)
提交回复
热议问题