From 778af13c4da56b03caca6cf867e5e0f734f1d039 Mon Sep 17 00:00:00 2001 From: Ilya Valasiuk Date: Sat, 3 Apr 2021 23:39:57 +0300 Subject: [PATCH] use regional domain name for s3 bucket in cf distribution --- serverless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless.yml b/serverless.yml index dbace95d6..7267b62a4 100644 --- a/serverless.yml +++ b/serverless.yml @@ -69,7 +69,7 @@ resources: Properties: DistributionConfig: Origins: - - DomainName: ${self:custom.s3BucketName}.s3.amazonaws.com + - DomainName: !GetAtt WebAppS3Bucket.RegionalDomainName ## An identifier for the origin which must be unique within the distribution Id: myS3Origin ## In case you don't want to restrict the bucket access use CustomOriginConfig and remove S3OriginConfig