Skip to content

Commit

Permalink
feat(aws-kinesisstreams-gluejob): encrypted bucket in existing job in…
Browse files Browse the repository at this point in the history
…teg test (#504)

* encypted bucket in existing job integ test

* empty commit
  • Loading branch information
mickychetta authored Nov 16, 2021
1 parent d7d10f6 commit 04d0642
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
"existingScriptLocation845F3C51": {
"Type": "AWS::S3::Bucket",
"Properties": {
"BucketEncryption": {
"ServerSideEncryptionConfiguration": [
{
"ServerSideEncryptionByDefault": {
"SSEAlgorithm": "AES256"
}
}
]
},
"LifecycleConfiguration": {
"Rules": [
{
Expand All @@ -13,8 +22,8 @@
]
}
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain",
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete",
"Metadata": {
"cfn_nag": {
"rules_to_suppress": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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 = {
Expand Down

0 comments on commit 04d0642

Please sign in to comment.