https://pulumi.com logo
#aws
Title
# aws
d

dazzling-sundown-39670

06/22/2020, 3:08 PM
Hello, can anyone help me with this error?
error: aws:cloudfront/distribution:Distribution resource 'cdn' has a problem: "origin.0.domain_name": required field is not set
I have it specified here: https://gist.github.com/benjick/c356bf1776ae5da21cb42baf24eb3563#file-docs-s3-pulumi-ts-L21 I was following this tutorial: https://www.pulumi.com/blog/serving-a-static-website-on-aws-with-pulumi/
f

future-barista-68134

06/22/2020, 3:16 PM
Hi Max, you should update your bucket to the following:
Copy code
// contentBucket is the S3 bucket that the website's contents will be stored in.
const contentBucket = new aws.s3.Bucket("contentBucket",
    {
        bucket: targetDomain,
        acl: "public-read",
        // Configure S3 to serve bucket contents as a website. This way S3 will automatically convert
        // requests for "foo/" to "foo/index.html".
        website: {
            indexDocument: "index.html"
        },
    });
also would be good to actually create a
index.html
object to properly test out the functionality there 🙂
d

dazzling-sundown-39670

06/22/2020, 4:36 PM
@future-barista-68134 thank you, I will do that! Cheers 🙏