-
Notifications
You must be signed in to change notification settings - Fork 95
Description
Hey Sequin team,
I discovered what appears to be a bug with the handling of expired security tokens when using the Kinesis sink.
In the logs I am getting the following error:
[warning] [21:47:50.670] Failed to deliver messages to sink: [aws_kinesis]: Error from AWS: The security token included in the request is expired (status=400) line=506 pid=<0.13227210.0> file=lib/sequin/runtime/sink_pipeline.ex domain=elixir application=sequin account_id=00418827-4530-498c-9aaa-ed754dbb7c05 consumer_id=5ac7a484-9599-4063-b17b-b4bdee53243d
The UI also displays the sink as being unhealthy. Initially I thought this may be a permissions issue with the ECS Task Role, however I don't believe that's the case.
Here are the permissions that the role I am using has:
Policies:
- PolicyName: KinesisPublisherTaskPolicy
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- kinesis:DescribeStream
- kinesis:DescribeStreamSummary
- kinesis:ListShards
- kinesis:PutRecord
- kinesis:PutRecords
Resource: '*'
- PolicyName: SequinTaskPolicy
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- ssmmessages:CreateControlChannel
- ssmmessages:CreateDataChannel
- ssmmessages:OpenControlChannel
- ssmmessages:OpenDataChannel
Resource: '*'
The issue can typically be resolved by going through and hitting the refresh icon on the healthcheck for a sink.
I also typically have to go through and hit "redeliver all" to the messages in queue after the healthcheck has confirmed the updated credentials within the container are valid.
Please let me know if you need any additional information, logs, testing, etc.
Thanks!