Skip to content

InvalidOriginAccessIdentityException : Typo in the Documentation (Origin-Access-Identity) #1179

@cartick

Description

@cartick

The documentation and javaDoc for origin-access-identity states that, there needs to be a prefix for setting the origin access identity; "origin-access-identity/CloudFront/".

SO, the above prefix needs to be added to the ID-of-origin-access-identity

So, this "origin-access-identity/CloudFront/ID-of-origin-access-identity " needs to be passed to the S3OriginConfig-> OriginAccessIdentity field.
S3OriginConfig().withOriginAccessIdentity("origin-access-identity/CloudFront/" + "123456789")

But the above configuration is causing this error:
Exception in thread "main" com.amazonaws.services.cloudfront.model.InvalidOriginAccessIdentityException: The specified origin access identity does not exist or is not valid. (Service: AmazonCloudFront; Status Code: 400; Error Code: InvalidOriginAccessIdentity)

When i changed "origin-access-identity/CloudFront/" to "origin-access-identity/cloudfront/" it worked fine. So, in the prefix, the "CloudFront" should be lowerCase ("cloudfront").
S3OriginConfig().withOriginAccessIdentity("origin-access-identity/cloudfront/" + "123456789")

REF :

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.documentationThis is a problem with documentation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions