Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default S3 Managed encryption #29

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
self.performInputValidation()

# Create a bucket for as delivery stream's destination
bucket = s3.Bucket(self, self.kinesis_destination_bucket_name, versioned=True, removal_policy=cdk.RemovalPolicy.DESTROY, auto_delete_objects=True)
bucket = s3.Bucket(self, self.kinesis_destination_bucket_name, versioned=True, removal_policy=cdk.RemovalPolicy.DESTROY, auto_delete_objects=True, encryption=s3.BucketEncryption.S3_MANAGED)

# Creating a role for the delivery stream
firehose_role = iam.Role(self, self.kinesis_delivery_stream_role_name, assumed_by=iam.ServicePrincipal("firehose.amazonaws.com"))
Expand Down
9 changes: 9 additions & 0 deletions cloud_templates/demo/demo_templates/kinesis_pattern.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
],
"VersioningConfiguration": {
"Status": "Enabled"
},
"BucketEncryption" : {
"ServerSideEncryptionConfiguration" : [
{
"ServerSideEncryptionByDefault" : {
"SSEAlgorithm" : "AES256"
}
}
]
}
},
"UpdateReplacePolicy": "Delete",
Expand Down
2 changes: 1 addition & 1 deletion cloud_templates/user_guides/kinesis_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ If you are interested in using the CloudFormation templates more than just for d
2. Run `python -m pip install -r requirements.txt` and `python -m pip install -r requirements.txt` to install the dependencies.
3. Go through the `README.md` file to learn about the context parameters that need to be set by you prior to deployment.
4. Set the context parameter values either by changing `cdk.json` file or by using the command line.
1. To create a command line context variable, use the **`—-context (-c) option`**, as shown in the following example: `$ cdk cdk synth -c bucket_name=mybucket`
1. To create a command line context variable, use the **`—-context (-c) option`**, as shown in the following example: `$ cdk synth -c bucket_name=mybucket`
2. To specify the same context variable and value in the `cdk.json` file, use the following code.`
{"context": { "bucket_name": "mybucket"}`
5. Run `cdk synth` to emit the synthesized CloudFormation template.
Expand Down