You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/README.md
+29-13Lines changed: 29 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -97,53 +97,69 @@ _Parameters_
97
97
| 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. |
98
98
| 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. |
99
99
| outputDataStore? |[`SinkDataStoreProps`](#sinkdatastoreprops)| User provided properties for S3 bucket that stores Glue Job output. Current datastore types suported is only S3. |
100
+
|createCloudWatchAlarms?|`boolean`|Whether to create recommended CloudWatch alarms for Kinesis Data Stream. Default value is set to `true`|
| existingS3OutputBucket? |[`Bucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.Bucket.html)| Existing instance of S3 bucket where the data should be written. Providing both this and `outputBucketProps` will cause an error. |
106
107
| outputBucketProps |[`BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)| User provided bucket properties to create the S3 bucket to store the output from the AWS Glue Job. |
107
108
| datastoreType |[`SinkStoreType`](#sinkstoretype)| Sink data store type. |
108
109
109
-
## SinkStoreType
110
+
###SinkStoreType
110
111
111
112
Enumeration of data store types that could include S3, DynamoDB, DocumentDB, RDS or Redshift. Current construct implementation only supports S3, but potential to add other output types in the future.
|cloudwatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudwatch.Alarm.html)|Returns an array of recommended CloudWatch Alarms created by the construct for Kinesis Data stream|
123
+
|glueJob|[`CfnJob`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-glue.CfnJob.html)|Returns an instance of AWS Glue Job created by the construct|
124
+
|glueJobRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iam.Role.html)|Returns an instance of the IAM Role created by the construct for the Glue Job|
125
+
|database|[`CfnDatabase`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-glue.CfnDatabase.html)|Returns an instance of AWS Glue Database created by the construct|
126
+
|table|[`CfnTable`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-glue.CfnTable.html)|Returns an instance of the AWS Glue Table created by the construct|
127
+
128
+
## Default settings
118
129
119
130
Out of the box implementation of the Construct without any override will set the following defaults:
120
131
121
132
### Amazon Kinesis Stream
122
133
123
-
-Configure least privilege access IAM role for Kinesis Stream
124
-
-Enable server-side encryption for Kinesis Stream using AWS Managed KMS Key
125
-
-Deploy best practices CloudWatch Alarms for the Kinesis Stream
134
+
- Configure least privilege access IAM role for Kinesis Stream
135
+
- Enable server-side encryption for Kinesis Stream using AWS Managed KMS Key
136
+
- Deploy best practices CloudWatch Alarms for the Kinesis Stream
126
137
127
138
### Glue Job
128
139
129
-
-Create a Glue Security Config that configures encryption for CloudWatch, Job Bookmarks, and S3. CloudWatch and Job Bookmarks are encrypted using AWS Managed KMS Key created for AWS Glue Service. The S3 bucket is configured with SSE-S3 encryption mode
130
-
-Configure service role policies that allow AWS Glue to read from Kinesis Data Streams
140
+
- Create a Glue Security Config that configures encryption for CloudWatch, Job Bookmarks, and S3. CloudWatch and Job Bookmarks are encrypted using AWS Managed KMS Key created for AWS Glue Service. The S3 bucket is configured with SSE-S3 encryption mode
141
+
- Configure service role policies that allow AWS Glue to read from Kinesis Data Streams
131
142
132
143
### Glue Database
133
144
134
-
-Create an AWS Glue database. An AWS Glue Table will be added to the database. This table defines the schema for the records buffered in the Amazon Kinesis Data Streams
145
+
- Create an AWS Glue database. An AWS Glue Table will be added to the database. This table defines the schema for the records buffered in the Amazon Kinesis Data Streams
135
146
136
147
### Glue Table
137
148
138
-
-Create an AWS Glue table. The table schema definition is based on the JSON structure of the records buffered in the Amazon Kinesis Data Streams
149
+
- Create an AWS Glue table. The table schema definition is based on the JSON structure of the records buffered in the Amazon Kinesis Data Streams
139
150
140
151
### IAM Role
141
152
142
-
-A job execution role that has privileges to 1) read the ETL script from the S3 bucket location, 2) read records from the Kinesis Stream, and 3) execute the Glue Job
153
+
- A job execution role that has privileges to 1) read the ETL script from the S3 bucket location, 2) read records from the Kinesis Stream, and 3) execute the Glue Job
143
154
144
155
### Output S3 Bucket
145
156
146
-
- An S3 bucket to store the output of the ETL transformation. This bucket will be passed as an argument to the created glue job so that it can be used in the ETL script to write data into it
157
+
- An S3 bucket to store the output of the ETL transformation. This bucket will be passed as an argument to the created glue job so that it can be used in the ETL script to write data into it
158
+
159
+
### Cloudwatch Alarms
160
+
161
+
- A CloudWatch Alarm to report when consumer application is reading data slower than expected
162
+
- A CloudWatch Alarm to report when consumer record processing is falling behind (to avoid risk of data loss due to record expiration)
147
163
148
164
## Architecture
149
165
@@ -153,4 +169,4 @@ Out of the box implementation of the Construct without any override will set the
153
169
154
170
A sample use case which uses this pattern is available under [`use_cases/aws-custom-glue-etl`](https://github.com/awslabs/aws-solutions-constructs/tree/master/source/use_cases/aws-custom-glue-etl).
Copy file name to clipboardExpand all lines: source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.existing-job.expected.json
Copy file name to clipboardExpand all lines: source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/integ.no-arguments.expected.json
Copy file name to clipboardExpand all lines: source/patterns/@aws-solutions-constructs/aws-kinesisstreams-gluejob/test/test.kinesisstream-gluejob.test.ts
0 commit comments