- Newest
- Most votes
- Most comments
Hello.
Looking at the documentation below, what is needed in the Resource section is an ARN in the following format:
https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonkinesisvideostreams.html
arn:${Partition}:kinesisvideo:${Region}:${Account}:stream/${StreamName}/${CreationTime}
So why not try adding "/*" to the end like this:
"arn:aws:kinesisvideo:*:accountId:stream/streamName/*"
There are several possible reasons why you're encountering the "not authorized to perform: kinesisvideo:GetDataEndpoint" error despite having attached a policy with the appropriate permissions:
-
Explicit Deny Overriding Your Allow: There might be an explicit deny statement in another policy attached to the role that is overriding your allow statement. In IAM, deny statements always take precedence over allow statements, even if they're in different policies.
-
Resource ARN Mismatch: Ensure that the resource ARN in your policy exactly matches the stream you're trying to access. Pay special attention to the region and account ID in the ARN. Even a small typo can cause permission issues.
-
Service Control Policies (SCPs): If your AWS account is part of an AWS Organization, there might be SCPs in place that are restricting this action across your organization or specific accounts.
-
Permission Boundaries: Check if any permission boundaries have been set on the role, which could be limiting the effective permissions.
-
Incorrect Role Assumption: Make sure you're properly assuming the role before attempting to access the resource, especially if working across accounts. You can verify this by running
aws sts get-caller-identityto confirm which role you're currently using. -
Region Specification: Your policy uses a wildcard for the region (
*). If you're trying to access a stream in a specific region, try explicitly specifying that region in the ARN instead of using the wildcard.
To troubleshoot this issue:
- Review all policies attached to the role, including managed and inline policies
- Double-check the resource ARN in your policy against the actual stream ARN
- Use the IAM Policy Simulator to test your policies and identify any missing permissions
- Check if there are any SCPs affecting your account
- Ensure you're using the correct credentials when making the API call
If you've verified all of these and are still encountering issues, you might need to contact AWS Support for a more detailed analysis of your account's permission structure.
Sources
Why am I getting an “AccessDenied” error despite attaching an inline policy to the role? | AWS re:Post
How do I troubleshoot when User: arn is no authorized to perform Create * or Delete * or Update * on resource(s) because no identity- policy allows the actions | AWS re:Post

i tried that and for all resources and the arn complete with CreationTime
I believe Riku's answer is correct. You need that "/*". You might have some other issue as well, but the resource definition in your question is certainly incorrect.
As a reference, see here: https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/gs-iam-role.html