-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy paths3.py
More file actions
22 lines (16 loc) · 689 Bytes
/
s3.py
File metadata and controls
22 lines (16 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from aws_cdk import (
aws_s3 as s3,
core
)
class CdkWorkshopStack(core.Stack):
def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
bucket = s3.Bucket(self,
"MyFirstBucket",
bucket_name="aws-wide-unique-name-CHANGE-THIS",
versioned=True,
removal_policy = core.RemovalPolicy.DESTROY,)
# The code that defines your stack goes here
# useful documentation:
# https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_s3/Bucket.html
# https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.core/RemovalPolicy.html#aws_cdk.core.RemovalPolicy