From ab67e3abeaf11f954821206efd546db9d952deef Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Fri, 4 Oct 2024 14:00:24 -0400 Subject: [PATCH] Adjust Python example accordingly --- aws-py-static-website/__main__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aws-py-static-website/__main__.py b/aws-py-static-website/__main__.py index 2ebd6cb86..7f6b279f9 100644 --- a/aws-py-static-website/__main__.py +++ b/aws-py-static-website/__main__.py @@ -59,8 +59,7 @@ def get_domain_and_subdomain(domain): certificate_arn = stack_config.get('certificateArn') # Create an S3 bucket configured as a website bucket. -content_bucket = pulumi_aws.s3.BucketV2('contentBucket', bucket=target_domain) -setup_acl('contentBucket', content_bucket, 'public-read') +content_bucket = pulumi_aws.s3.BucketV2(f'{target_domain}-content') content_bucket_website = pulumi_aws.s3.BucketWebsiteConfigurationV2('content-bucket', @@ -138,7 +137,7 @@ def bucket_object_converter(filepath): certificate_arn = cert_validation.certificate_arn # Create a logs bucket for the CloudFront logs -logs_bucket = pulumi_aws.s3.BucketV2('requestLogs', bucket=f'{target_domain}-logs') +logs_bucket = pulumi_aws.s3.BucketV2(f'{target_domain}-logs') setup_acl('requestLogs', logs_bucket, 'private') # Create the CloudFront distribution