| 9 | # attribute from it. |
| 10 | |
| 11 | class MyStack(Stack): |
| 12 | def __init__(self, scope: App, id: str, **kwargs) -> None: |
| 13 | super().__init__(scope, id, **kwargs) |
| 14 | |
| 15 | # Create s3 bucket |
| 16 | bucket = s3.Bucket(self, "CustomResourceTestBucket", |
| 17 | encryption=s3.BucketEncryption.S3_MANAGED, block_public_access=s3.BlockPublicAccess.BLOCK_ALL) |
| 18 | |
| 19 | resource = MyCustomResource( |
| 20 | self, "MyCustomResource", |
| 21 | bucket_name=bucket.bucket_name |
| 22 | ) |
| 23 | |
| 24 | app = App() |
| 25 | MyStack(app, "CustomResourceDemoStack") |