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?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南