diff --git a/s3-cloudfront.cfhighlander.rb b/s3-cloudfront.cfhighlander.rb index a52cf59..a8bb1ab 100644 --- a/s3-cloudfront.cfhighlander.rb +++ b/s3-cloudfront.cfhighlander.rb @@ -8,7 +8,7 @@ ComponentParam 'DnsDomain', isGlobal: true end - Component name: cloudfront_component_name, template: 'cloudfront@master.snapshot', render: Inline do + Component name: cloudfront_component_name, template: 'cloudfront@master.snapshot', render: Inline, config: @config do parameter name: "s3bucketOriginDomainName", value: FnGetAtt('Bucket', 'DomainName') end diff --git a/s3-cloudfront.cfndsl.rb b/s3-cloudfront.cfndsl.rb index cf76b6f..bfe778b 100644 --- a/s3-cloudfront.cfndsl.rb +++ b/s3-cloudfront.cfndsl.rb @@ -8,7 +8,7 @@ Effect: 'Allow', Action: 's3:GetObject', Resource: FnJoin('', [ 'arn:aws:s3:::', Ref("Bucket"), '/*']), - Principal: { CanonicalUser: FnGetAtt('s3bucketOriginAccessIdentity', 'S3CanonicalUserId') } + Principal: { CanonicalUser: { "Fn::GetAtt" => ['s3bucketOriginAccessIdentity', 'S3CanonicalUserId'] }} } ] }