From e4f425d89418255cb4a3dfa307f684fac1351091 Mon Sep 17 00:00:00 2001 From: mickychetta Date: Tue, 16 Nov 2021 21:17:23 +0000 Subject: [PATCH 1/2] encypted bucket in existing job integ test --- .../test/integ.existing-job.expected.json | 13 +++++++++++-- .../test/integ.existing-job.ts | 8 +++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.existing-job.expected.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.existing-job.expected.json index 22fbc6dea..c5f74c45f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.existing-job.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.existing-job.expected.json @@ -4,6 +4,15 @@ "existingScriptLocation845F3C51": { "Type": "AWS::S3::Bucket", "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + }, "LifecycleConfiguration": { "Rules": [ { @@ -13,8 +22,8 @@ ] } }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", "Metadata": { "cfn_nag": { "rules_to_suppress": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.existing-job.ts b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.existing-job.ts index 82ae33618..d78d2ca1a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.existing-job.ts +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.existing-job.ts @@ -14,8 +14,8 @@ // Imports import { CfnJob } from '@aws-cdk/aws-glue'; import { Role, ServicePrincipal } from '@aws-cdk/aws-iam'; -import { Bucket, CfnBucket } from '@aws-cdk/aws-s3'; -import { App, Duration, Stack } from '@aws-cdk/core'; +import { Bucket, BucketEncryption, CfnBucket } from '@aws-cdk/aws-s3'; +import { App, Duration, RemovalPolicy, Stack } from '@aws-cdk/core'; import { generateIntegStackName, SinkStoreType } from '@aws-solutions-constructs/core'; import { KinesisstreamsToGluejob } from '../lib'; @@ -28,7 +28,9 @@ const scriptBucket = new Bucket(stack, 'existingScriptLocation', { versioned: false, lifecycleRules: [{ expiration: Duration.days(30) - }] + }], + removalPolicy: RemovalPolicy.DESTROY, + encryption: BucketEncryption.S3_MANAGED }); (scriptBucket.node.defaultChild as CfnBucket).cfnOptions.metadata = { From a40fbfe11f0cd73ce369ae5a691fbe49b4492976 Mon Sep 17 00:00:00 2001 From: mickychetta Date: Tue, 16 Nov 2021 21:52:14 +0000 Subject: [PATCH 2/2] empty commit --- .../aws-kinesisstreams-gluejob/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/README.md b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/README.md index df82728e2..c82c339d3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/README.md +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/README.md @@ -97,7 +97,7 @@ _Parameters_ | tableProps? | [`CfnTableProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-glue.TableProps.html) | User provided AWS Glue Table props to override default props used to create a Glue Table. | | fieldSchema? | [`CfnTable.ColumnProperty[]`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-glue.CfnTable.ColumnProperty.html) | User provided schema structure to create an AWS Glue Table. | | outputDataStore? | [`SinkDataStoreProps`](#sinkdatastoreprops) | User provided properties for S3 bucket that stores Glue Job output. Current datastore types suported is only S3. | -|createCloudWatchAlarms?|`boolean`|Whether to create recommended CloudWatch alarms for Kinesis Data Stream. Default value is set to `true`| +|createCloudWatchAlarms?|`boolean`|Whether to create recommended CloudWatch alarms for Kinesis Data Stream. Default value is set to `true`.| ### SinkDataStoreProps