Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::CloudFront::CloudFrontOriginAccessIdentity

The AWS::CloudFront::CloudFrontOriginAccessIdentity resource specifies the CloudFront origin access identity to associate with the origin of a CloudFront distribution. For more information, see OriginAccessIdentity in the Amazon CloudFront API Reference.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "Type" : "AWS::CloudFront::CloudFrontOriginAccessIdentity", "Properties" : { "CloudFrontOriginAccessIdentityConfig" : CloudFrontOriginAccessIdentityConfig } }

YAML

Copy
Type: "AWS::CloudFront::CloudFrontOriginAccessIdentity" Properties: CloudFrontOriginAccessIdentityConfig: CloudFrontOriginAccessIdentityConfig

Properties

CloudFrontOriginAccessIdentityConfig

The configuration of the CloudFront origin access identity.

Required: Yes

Type: CloudFrontOriginAccessIdentityConfig

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of an AWS::CloudFront::CloudFrontOriginAccessIdentity resource to the intrinsic Ref function, the function returns the origin access identity, such as E15MNIMTCFKK4C.

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

S3CanonicalUserId

The Amazon S3 canonical user ID for the origin access identity, used when giving the origin access identity read permission to an object in Amazon S3. For example: b970b42360b81c8ddbd79d2f5df0069ba9033c8a79655752abe380cd6d63ba8bcf23384d568fcf89fc49700b5e11a0fd.

For more information about using Fn::GetAtt, see Fn::GetAtt.

Example

The following example specifies the comment for an origin access identity.

JSON

Copy
{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "cloudfrontoriginaccessidentity": { "Type": "AWS::CloudFront::CloudFrontOriginAccessIdentity", "Properties": { "CloudFrontOriginAccessIdentityConfig": { "Comment": "string-value" } } } } }

YAML

Copy
AWSTemplateFormatVersion: 2010-09-09 Resources: cloudfrontoriginaccessidentity: Type: 'AWS::CloudFront::CloudFrontOriginAccessIdentity' Properties: CloudFrontOriginAccessIdentityConfig: Comment: string-value

See Also