@@ -60,6 +60,14 @@ Resources:
6060 IndexDocument : index.html
6161 ErrorDocument : ${self:custom.site.errorDoc.${self:provider.stage}, null}
6262
63+ CSharpBucket :
64+ Type : " AWS::S3::Bucket"
65+ Properties :
66+ BucketName : ${self:custom.cSharpBucketName}
67+ WebsiteConfiguration :
68+ IndexDocument : index.html
69+ ErrorDocument : ${self:custom.site.errorDoc.${self:provider.stage}, null}
70+
6371 DocsBucketPolicy :
6472 Type : AWS::S3::BucketPolicy
6573 Properties :
@@ -270,4 +278,34 @@ Resources:
270278 AWS : arn:aws:iam::${aws:accountId}:role/docs-deploy-job-${self:provider.stage}-batch
271279 Action : ' s3:PutObject'
272280 Resource :
273- - Fn::Join : ['', [{ "Fn::GetAtt": ["NodeBucket", "Arn" ] }, '/*']]
281+ - Fn::Join : ['', [{ "Fn::GetAtt": ["NodeBucket", "Arn" ] }, '/*']]
282+
283+ CSharpBucketPolicy :
284+ Type : AWS::S3::BucketPolicy
285+ Properties :
286+ Bucket :
287+ Ref : CSharpBucket
288+ PolicyDocument :
289+ Statement :
290+ - Sid : PublicReadGetObject
291+ Effect : Allow
292+ Principal : " *"
293+ Action :
294+ - s3:GetObject
295+ Resource :
296+ - Fn::Join : ['', [{ "Fn::GetAtt": ["CSharpBucket", "Arn" ] }, '/*']]
297+ - Effect : Allow
298+ Principal :
299+ AWS : arn:aws:iam::${aws:accountId}:role/docs-archive-job-${self:provider.stage}-batch
300+ Action :
301+ - ' s3:GetObject'
302+ - ' s3:ListBucket'
303+ Resource :
304+ - Fn::Join : ['', [{ "Fn::GetAtt": ["CSharpBucket", "Arn" ] }, '/*']]
305+ - Fn::Join : ['', [{ "Fn::GetAtt": ["CSharpBucket", "Arn" ] }]]
306+ - Effect : Allow
307+ Principal :
308+ AWS : arn:aws:iam::${aws:accountId}:role/docs-deploy-job-${self:provider.stage}-batch
309+ Action : ' s3:PutObject'
310+ Resource :
311+ - Fn::Join : ['', [{ "Fn::GetAtt": ["CSharpBucket", "Arn" ] }, '/*']]
0 commit comments