Skip to content

Data Source: awsCloudfrontOriginAccessIdentity

Use this data source to retrieve information for an Amazon CloudFront origin access identity.

Example Usage

The following example below creates a CloudFront origin access identity.

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsCloudfrontOriginAccessIdentity.DataAwsCloudfrontOriginAccessIdentity(
  this,
  "example",
  {
    id: "EDFDVBD632BHDS5",
  }
);

Argument Reference

  • id (Required) - The identifier for the distribution. For example: edfdvbd632Bhds5.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • callerReference - Internal value used by CloudFront to allow future updates to the origin access identity.
  • cloudfrontAccessIdentityPath - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
  • comment - An optional comment for the origin access identity.
  • etag - Current version of the origin access identity's information. For example: e2Qwruhapomqzl.
  • iamArn - Pre-generated ARN for use in S3 bucket policies (see below). Example: arn:aws:iam::cloudfront:user/cloudFrontOriginAccessIdentity E2Qwruhapomqzl.
  • s3CanonicalUserId - The Amazon S3 canonical user ID for the origin access identity, which you use when giving the origin access identity read permission to an object in Amazon S3.