Hi again! I have some issues understanding how wor...
# aws
s
Hi again! I have some issues understanding how works the AWS cloudfront distribution object (
aws.cloudfront.Distribution
), its arguments and the documentation about it: https://www.pulumi.com/registry/packages/aws/api-docs/cloudfront/distribution/#distributionorigin 1. How can I specify an
origin
(
aws.cloudfront.DistributionOriginArgs
) for the
aws.cloudfront.Distribution
where it would correspond to “origin access” = “access control settings” (recommended AWS setting - the circled in red option on my screenshot), and/or “origin access” = “legacy access identities”? 2. I have trouble understanding what is the
origin_id
argument of
aws.cloudfront.DistributionOriginArgs
on the same documentation page. Doc says “The unique identifier of the member origin”, but it’s very obscure to me. Is it the ARN of the S3 bucket? The ID of the S3 bucket? Something else?
b
okay, this is actually AWS creating a magic button to create a whole bunch of resources in the background. They don’t expose this via their API as a single setting, it’s actually a bucket policy.
👍 1
s
okay, this is actually AWS creating a magic button to create a whole bunch of resources in the background. They don’t expose this via their API as a single setting, it’s actually a bucket policy.
I understand for the “access control settings”. But what about “legacy access identities”? Also wonder what is
origin_id
there’s an example in typescript here: https://github.com/jaxxstorm/pulumi-examples/blob/main/typescript/aws/s3-cloudfront/index.ts
thanks, looking now, helps a lot
I see from your typescript example you need to apply a special policy to the bucket. Will try that
Even better, the example in Python in my case:
m
If your bucket uses SSE, you need to use AES256, KMS doesn't work with OAI
b
OAC isn’t in the cloud control API or terraform yet 😞
😞 1
😟 1