forked from arielkru/badCode
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy paths3bucket.yaml
More file actions
29 lines (29 loc) · 1.09 KB
/
s3bucket.yaml
File metadata and controls
29 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
AWSTemplateFormatVersion: '2010-09-09'
Metadata:
License: Apache-2.0
Description: 'AWS CloudFormation Sample Template S3_Website_Bucket_With_Retain_On_Delete:
Sample template showing how to create a publicly accessible S3 bucket configured
for website access with a deletion policy of retain on delete. **WARNING** This
template creates an S3 bucket that will NOT be deleted when the stack is deleted.
You will be billed for the AWS resources used if you create a stack from this template.'
Resources:
S3Bucket:
Type: AWS::S3::Bucket
Properties:
AccessControl: PublicRead
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: error.html
Tags:
- Key: yor_trace
Value: 9055c699-9192-43c7-87a9-62a6cda51120
- Key: jmtags
Value: "12345"
DeletionPolicy: Retain
Outputs:
WebsiteURL:
Value: !GetAtt [S3Bucket, WebsiteURL]
Description: URL for website hosted on S3
S3BucketSecureURL:
Value: !Join ['', ['https://', !GetAtt [S3Bucket, DomainName]]]
Description: Name of S3 bucket to hold website content