Skip to content

kinsalate getRecords is giving error "An error occurred (UnrecognizedClientException) when calling the GetRecords operation: The security token included in the request is invalid." #14

@rajcspsg

Description

@rajcspsg

steps to reproduce -

I've started the below docker-compose -

https://github.com/jeremyber-aws/local-development-with-flink-and-kinesis/blob/master/docker-compose.yml

  1. I'm sucessfullay able to create Stream AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=x aws kinesis create-stream --endpoint-url https://localhost:4567 --stream-name my-local-stream --shard-count 6 --no-verify-ssl --region us-west-2
  2. Able to list stream successfully AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=x aws kinesis list-streams --endpoint-url https://localhost:4567 --shard-count 6 --no-verify-ssl --region us-west-2
  3. Able to put records successfully
AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=x  aws kinesis put-record --stream-name my-local-stream --data 'RGF0YT1qb3NlfDEyCg==' --partition-key 'PartitionKey=partitionkey1'  --endpoint-url https://localhost:4567  --no-verify-ssl --region us-west-2

AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=x  aws kinesis put-record --stream-name my-local-stream --data 'RGF0YT1qb3NlfDEz' --partition-key 'PartitionKey=partitionkey1'  --endpoint-url https://localhost:4567  --no-verify-ssl --region us-west-2

AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=x  aws kinesis put-record --stream-name my-local-stream --data 'RGF0YT1qb3NlfDE0' --partition-key 'PartitionKey=partitionkey2'  --endpoint-url https://localhost:4567  --no-verify-ssl --region us-west-2
  1. Able to list shards AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=x aws kinesis list-shards --stream-name my-local-stream --endpoint-url https://localhost:4567 --no-verify-ssl --region us-west-2

  2. Able to get-shard-iterator

AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=x aws kinesis get-shard-iterator --stream-name my-local-stream --endpoint-url https://localhost:4567 --shard-id shardId-000000000000 --shard-iterator-type LATEST --no-verify-ssl --region us-west-2

  1. But getrecords is failing with error using the command AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=x aws kinesis get-records --shard-iterator AAAAAAAAAAHhRrrEzLbhbcycTaMQr2iQH60Tg9tYdn0O48pVojEYJaoVhgzvg/2RqTIsh3Mkivheu8Wh2/KpwIAMO0AzhoiN+QMaAGTgeSnL+YooQoHP/lzaSFhfLDmAE+2b+7BoWCiykcQSsrwnTSpcdh83Jcpx3RDTXqZyGPq3jTa6eGj+U2QEvmH7bixbSnAby0bV1tTLI4nRFfebox9MlY+3mFF4 --no-verify-ssl --region us-west-2
Screenshot 2023-07-10 at 1 27 15 PM

I deleted my local aws configuration and reconfigured it and I tried most options like adding session token and security token but nothing works :(

Any idea how to may this work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions