in stacks/data_sandbox_s3.py [0:0]
def __init__(self, scope: core.Construct, id: str, aws_region='', **kwargs) -> None:
super().__init__(scope, id, **kwargs)
# Build S3 bucket
self.data_sandbox_bucket = s3.Bucket(self, 'DataSandboxBucket',
encryption=s3.BucketEncryption.S3_MANAGED
)
# Upload appstream scripts
deploy_appstream_scripts = s3_deployment.BucketDeployment(
self, 'AppstreamScriptsDeployment',
sources=[s3_deployment.Source.asset(os.path.join(current_dir, '../appstream_scripts/'))],
destination_bucket=self.data_sandbox_bucket,
destination_key_prefix='appstream-scripts'
)
# build ssm parameters
ssm.StringParameter(self, 'BucketParam',
parameter_name='/s3/datasandboxbucket',
string_value=json.dumps({
"bucket-name": [f'{self.data_sandbox_bucket.bucket_name}']
}))