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개 답변
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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠