Try AWS Native preview for resources not in the classic version.
aws.cloudfront.OriginAccessIdentity
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Creates an Amazon CloudFront origin access identity.
For information about CloudFront distributions, see the Amazon CloudFront Developer Guide. For more information on generating origin access identities, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content.
Example Usage
The following example below creates a CloudFront origin access identity.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudfront.OriginAccessIdentity("example", {comment: "Some comment"});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.OriginAccessIdentity("example", comment="Some comment")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.NewOriginAccessIdentity(ctx, "example", &cloudfront.OriginAccessIdentityArgs{
Comment: pulumi.String("Some comment"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudFront.OriginAccessIdentity("example", new()
{
Comment = "Some comment",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.OriginAccessIdentity;
import com.pulumi.aws.cloudfront.OriginAccessIdentityArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new OriginAccessIdentity("example", OriginAccessIdentityArgs.builder()
.comment("Some comment")
.build());
}
}
resources:
example:
type: aws:cloudfront:OriginAccessIdentity
properties:
comment: Some comment
Using With CloudFront
Normally, when referencing an origin access identity in CloudFront, you need to
prefix the ID with the origin-access-identity/cloudfront/
special path.
The cloudfront_access_identity_path
allows this to be circumvented.
The below snippet demonstrates use with the s3_origin_config
structure for the
aws.cloudfront.Distribution
resource:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudfront.Distribution("example", {origins: [{
s3OriginConfig: {
originAccessIdentity: exampleAwsCloudfrontOriginAccessIdentity.cloudfrontAccessIdentityPath,
},
}]});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.Distribution("example", origins=[{
"s3OriginConfig": {
"originAccessIdentity": example_aws_cloudfront_origin_access_identity["cloudfrontAccessIdentityPath"],
},
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.NewDistribution(ctx, "example", &cloudfront.DistributionArgs{
Origins: cloudfront.DistributionOriginArray{
&cloudfront.DistributionOriginArgs{
S3OriginConfig: &cloudfront.DistributionOriginS3OriginConfigArgs{
OriginAccessIdentity: pulumi.Any(exampleAwsCloudfrontOriginAccessIdentity.CloudfrontAccessIdentityPath),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudFront.Distribution("example", new()
{
Origins = new[]
{
new Aws.CloudFront.Inputs.DistributionOriginArgs
{
S3OriginConfig = new Aws.CloudFront.Inputs.DistributionOriginS3OriginConfigArgs
{
OriginAccessIdentity = exampleAwsCloudfrontOriginAccessIdentity.CloudfrontAccessIdentityPath,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.Distribution;
import com.pulumi.aws.cloudfront.DistributionArgs;
import com.pulumi.aws.cloudfront.inputs.DistributionOriginArgs;
import com.pulumi.aws.cloudfront.inputs.DistributionOriginS3OriginConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Distribution("example", DistributionArgs.builder()
.origins(DistributionOriginArgs.builder()
.s3OriginConfig(DistributionOriginS3OriginConfigArgs.builder()
.originAccessIdentity(exampleAwsCloudfrontOriginAccessIdentity.cloudfrontAccessIdentityPath())
.build())
.build())
.build());
}
}
resources:
example:
type: aws:cloudfront:Distribution
properties:
origins:
- s3OriginConfig:
originAccessIdentity: ${exampleAwsCloudfrontOriginAccessIdentity.cloudfrontAccessIdentityPath}
Updating your bucket policy
Note that the AWS API may translate the s3_canonical_user_id
CanonicalUser
principal into an AWS
IAM ARN principal when supplied in an
aws.s3.BucketV2
bucket policy, causing spurious diffs. If
you see this behavior, use the iam_arn
instead:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const s3Policy = aws.iam.getPolicyDocument({
statements: [{
actions: ["s3:GetObject"],
resources: [`${exampleAwsS3Bucket.arn}/*`],
principals: [{
type: "AWS",
identifiers: [exampleAwsCloudfrontOriginAccessIdentity.iamArn],
}],
}],
});
const example = new aws.s3.BucketPolicy("example", {
bucket: exampleAwsS3Bucket.id,
policy: s3Policy.then(s3Policy => s3Policy.json),
});
import pulumi
import pulumi_aws as aws
s3_policy = aws.iam.get_policy_document(statements=[{
"actions": ["s3:GetObject"],
"resources": [f"{example_aws_s3_bucket['arn']}/*"],
"principals": [{
"type": "AWS",
"identifiers": [example_aws_cloudfront_origin_access_identity["iamArn"]],
}],
}])
example = aws.s3.BucketPolicy("example",
bucket=example_aws_s3_bucket["id"],
policy=s3_policy.json)
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
s3Policy, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
Statements: []iam.GetPolicyDocumentStatement{
{
Actions: []string{
"s3:GetObject",
},
Resources: []string{
fmt.Sprintf("%v/*", exampleAwsS3Bucket.Arn),
},
Principals: []iam.GetPolicyDocumentStatementPrincipal{
{
Type: "AWS",
Identifiers: interface{}{
exampleAwsCloudfrontOriginAccessIdentity.IamArn,
},
},
},
},
},
}, nil);
if err != nil {
return err
}
_, err = s3.NewBucketPolicy(ctx, "example", &s3.BucketPolicyArgs{
Bucket: pulumi.Any(exampleAwsS3Bucket.Id),
Policy: pulumi.String(s3Policy.Json),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var s3Policy = Aws.Iam.GetPolicyDocument.Invoke(new()
{
Statements = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
{
Actions = new[]
{
"s3:GetObject",
},
Resources = new[]
{
$"{exampleAwsS3Bucket.Arn}/*",
},
Principals = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
{
Type = "AWS",
Identifiers = new[]
{
exampleAwsCloudfrontOriginAccessIdentity.IamArn,
},
},
},
},
},
});
var example = new Aws.S3.BucketPolicy("example", new()
{
Bucket = exampleAwsS3Bucket.Id,
Policy = s3Policy.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.s3.BucketPolicy;
import com.pulumi.aws.s3.BucketPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var s3Policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
.statements(GetPolicyDocumentStatementArgs.builder()
.actions("s3:GetObject")
.resources(String.format("%s/*", exampleAwsS3Bucket.arn()))
.principals(GetPolicyDocumentStatementPrincipalArgs.builder()
.type("AWS")
.identifiers(exampleAwsCloudfrontOriginAccessIdentity.iamArn())
.build())
.build())
.build());
var example = new BucketPolicy("example", BucketPolicyArgs.builder()
.bucket(exampleAwsS3Bucket.id())
.policy(s3Policy.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
.build());
}
}
resources:
example:
type: aws:s3:BucketPolicy
properties:
bucket: ${exampleAwsS3Bucket.id}
policy: ${s3Policy.json}
variables:
s3Policy:
fn::invoke:
Function: aws:iam:getPolicyDocument
Arguments:
statements:
- actions:
- s3:GetObject
resources:
- ${exampleAwsS3Bucket.arn}/*
principals:
- type: AWS
identifiers:
- ${exampleAwsCloudfrontOriginAccessIdentity.iamArn}
Create OriginAccessIdentity Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OriginAccessIdentity(name: string, args?: OriginAccessIdentityArgs, opts?: CustomResourceOptions);
@overload
def OriginAccessIdentity(resource_name: str,
args: Optional[OriginAccessIdentityArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def OriginAccessIdentity(resource_name: str,
opts: Optional[ResourceOptions] = None,
comment: Optional[str] = None)
func NewOriginAccessIdentity(ctx *Context, name string, args *OriginAccessIdentityArgs, opts ...ResourceOption) (*OriginAccessIdentity, error)
public OriginAccessIdentity(string name, OriginAccessIdentityArgs? args = null, CustomResourceOptions? opts = null)
public OriginAccessIdentity(String name, OriginAccessIdentityArgs args)
public OriginAccessIdentity(String name, OriginAccessIdentityArgs args, CustomResourceOptions options)
type: aws:cloudfront:OriginAccessIdentity
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args OriginAccessIdentityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args OriginAccessIdentityArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args OriginAccessIdentityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OriginAccessIdentityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OriginAccessIdentityArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var originAccessIdentityResource = new Aws.CloudFront.OriginAccessIdentity("originAccessIdentityResource", new()
{
Comment = "string",
});
example, err := cloudfront.NewOriginAccessIdentity(ctx, "originAccessIdentityResource", &cloudfront.OriginAccessIdentityArgs{
Comment: pulumi.String("string"),
})
var originAccessIdentityResource = new OriginAccessIdentity("originAccessIdentityResource", OriginAccessIdentityArgs.builder()
.comment("string")
.build());
origin_access_identity_resource = aws.cloudfront.OriginAccessIdentity("originAccessIdentityResource", comment="string")
const originAccessIdentityResource = new aws.cloudfront.OriginAccessIdentity("originAccessIdentityResource", {comment: "string"});
type: aws:cloudfront:OriginAccessIdentity
properties:
comment: string
OriginAccessIdentity Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The OriginAccessIdentity resource accepts the following input properties:
- Comment string
- An optional comment for the origin access identity.
- Comment string
- An optional comment for the origin access identity.
- comment String
- An optional comment for the origin access identity.
- comment string
- An optional comment for the origin access identity.
- comment str
- An optional comment for the origin access identity.
- comment String
- An optional comment for the origin access identity.
Outputs
All input properties are implicitly available as output properties. Additionally, the OriginAccessIdentity resource produces the following output properties:
- Caller
Reference string - Internal value used by CloudFront to allow future updates to the origin access identity.
- Cloudfront
Access stringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- Etag string
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - Iam
Arn string - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - Id string
- The provider-assigned unique ID for this managed resource.
- S3Canonical
User stringId - 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.
- Caller
Reference string - Internal value used by CloudFront to allow future updates to the origin access identity.
- Cloudfront
Access stringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- Etag string
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - Iam
Arn string - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - Id string
- The provider-assigned unique ID for this managed resource.
- S3Canonical
User stringId - 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.
- caller
Reference String - Internal value used by CloudFront to allow future updates to the origin access identity.
- cloudfront
Access StringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- etag String
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - iam
Arn String - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - id String
- The provider-assigned unique ID for this managed resource.
- s3Canonical
User StringId - 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.
- caller
Reference string - Internal value used by CloudFront to allow future updates to the origin access identity.
- cloudfront
Access stringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- etag string
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - iam
Arn string - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - id string
- The provider-assigned unique ID for this managed resource.
- s3Canonical
User stringId - 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.
- caller_
reference str - Internal value used by CloudFront to allow future updates to the origin access identity.
- cloudfront_
access_ stridentity_ path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- etag str
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - iam_
arn str - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - id str
- The provider-assigned unique ID for this managed resource.
- s3_
canonical_ struser_ id - 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.
- caller
Reference String - Internal value used by CloudFront to allow future updates to the origin access identity.
- cloudfront
Access StringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- etag String
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - iam
Arn String - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - id String
- The provider-assigned unique ID for this managed resource.
- s3Canonical
User StringId - 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.
Look up Existing OriginAccessIdentity Resource
Get an existing OriginAccessIdentity resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: OriginAccessIdentityState, opts?: CustomResourceOptions): OriginAccessIdentity
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
caller_reference: Optional[str] = None,
cloudfront_access_identity_path: Optional[str] = None,
comment: Optional[str] = None,
etag: Optional[str] = None,
iam_arn: Optional[str] = None,
s3_canonical_user_id: Optional[str] = None) -> OriginAccessIdentity
func GetOriginAccessIdentity(ctx *Context, name string, id IDInput, state *OriginAccessIdentityState, opts ...ResourceOption) (*OriginAccessIdentity, error)
public static OriginAccessIdentity Get(string name, Input<string> id, OriginAccessIdentityState? state, CustomResourceOptions? opts = null)
public static OriginAccessIdentity get(String name, Output<String> id, OriginAccessIdentityState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Caller
Reference string - Internal value used by CloudFront to allow future updates to the origin access identity.
- Cloudfront
Access stringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- Comment string
- An optional comment for the origin access identity.
- Etag string
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - Iam
Arn string - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - S3Canonical
User stringId - 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.
- Caller
Reference string - Internal value used by CloudFront to allow future updates to the origin access identity.
- Cloudfront
Access stringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- Comment string
- An optional comment for the origin access identity.
- Etag string
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - Iam
Arn string - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - S3Canonical
User stringId - 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.
- caller
Reference String - Internal value used by CloudFront to allow future updates to the origin access identity.
- cloudfront
Access StringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- comment String
- An optional comment for the origin access identity.
- etag String
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - iam
Arn String - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - s3Canonical
User StringId - 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.
- caller
Reference string - Internal value used by CloudFront to allow future updates to the origin access identity.
- cloudfront
Access stringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- comment string
- An optional comment for the origin access identity.
- etag string
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - iam
Arn string - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - s3Canonical
User stringId - 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.
- caller_
reference str - Internal value used by CloudFront to allow future updates to the origin access identity.
- cloudfront_
access_ stridentity_ path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- comment str
- An optional comment for the origin access identity.
- etag str
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - iam_
arn str - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - s3_
canonical_ struser_ id - 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.
- caller
Reference String - Internal value used by CloudFront to allow future updates to the origin access identity.
- cloudfront
Access StringIdentity Path - A shortcut to the full path for the origin access identity to use in CloudFront, see below.
- comment String
- An optional comment for the origin access identity.
- etag String
- The current version of the origin access identity's information.
For example:
E2QWRUHAPOMQZL
. - iam
Arn String - A pre-generated ARN for use in S3 bucket policies (see below).
Example:
arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E2QWRUHAPOMQZL
. - s3Canonical
User StringId - 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.
Import
Using pulumi import
, import Cloudfront Origin Access Identities using the id
. For example:
$ pulumi import aws:cloudfront/originAccessIdentity:OriginAccessIdentity origin_access E74FTE3AEXAMPLE
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.