MissingAuthenticationTokenException

0

Hi,

I'm developing a project of segurity camera, the camera firmware sends the data in base64 from the camera through an MQTT message, a lambda function in javascript and node js receives the data and processes it to start a live stream in kinesis video stream.

I'm using http2 to send it to KVS but I have an error that I can't solve.

{ 'x-amzn-errortype': 'MissingAuthenticationTokenException: ......', }

What does this error message mean and how could I solve it?

Thank you.

Oliver B.

已提问 2 个月前82 查看次数
2 回答
0

The "MissingAuthenticationTokenException" error you're encountering occurs because the HTTP/2 connection to Kinesis Video Streams (KVS) requires proper AWS authentication credentials. It can be a common issue when setting up video streaming with KVS. To solve this issues, I would recommend the following:

  1. Include AWS Credentials
  • Your requests to KVS must include valid AWS credentials
  • These credentials authenticate your service to access KVS resources
  1. Implement Request Signing
  • All requests must be signed using AWS Signature Version 4 (SigV4)
  • This signing process ensures request authenticity and integrity
  1. Configure IAM Permissions The Lambda function's execution role needs specific permissions:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kinesisvideo:PutMedia",
                "kinesisvideo:GetDataEndpoint"
            ],
            "Resource": "*"
        }
    ]
}
AWS
已回答 2 个月前
  • Thanks for answering, I'll try it

0

Hi,

All AWS services require all client requests to be signed with SigV4 protocol: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html (Plain http won't work)

It is a quite sophisticated protocol: getting it right takes time (I tried ...).

So, it is much simpler to use the AWS SDK of your language to directly leverage its SigV4 implementation.

Since the AWS SDK is OSS and if you really need to implement SigV4 youself, I recommend to get the corresponding SigV4 implementation from our SDK of choice. (That's what I ended up doing...)

Best,

Didier

profile pictureAWS
专家
已回答 2 个月前
  • Thanks for answering,

    I'm really new to this, do you know a place where I can see an example of how it is implemented?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则