Skip to content

Commit

Permalink
Update to version v1.62.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hnishar committed Sep 10, 2020
1 parent abddeed commit c7aa9ae
Show file tree
Hide file tree
Showing 71 changed files with 2,181 additions and 1,345 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.62.0] - 2020-09-09

### Added
- aws-events-rule-sqs pattern added ([#25](https://github.com/awslabs/aws-solutions-constructs/issues/25))
- aws-events-rule-sns pattern added ([#42](https://github.com/awslabs/aws-solutions-constructs/issues/42))
- aws-apigateway-kinesisstreams pattern added ([#51](https://github.com/awslabs/aws-solutions-constructs/issues/51))

### Changed
- Upgraded all patterns to CDK v1.62.0

## [1.61.1] - 2020-09-01

### Added
Expand Down Expand Up @@ -161,4 +171,4 @@ General Availability of the AWS Solutions Constructs!! 🎉🎉🥂🥂🍾🍾
- aws-s3-lambda pattern added
- aws-sns-lambda pattern added
- aws-sqs-lambda pattern added
- core pattern added
- core pattern added
2 changes: 1 addition & 1 deletion source/lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"./patterns/@aws-solutions-constructs/*"
],
"rejectCycles": "true",
"version": "1.61.1"
"version": "1.62.0"
}
2 changes: 1 addition & 1 deletion source/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-solutions-constructs",
"version": "1.61.1",
"version": "1.62.0",
"description": "AWS Solutions Constructs Library",
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-apigateway-dynamodb",
"version": "1.61.1",
"version": "1.62.0",
"description": "CDK Constructs for AWS API Gateway and Amazon DynamoDB integration.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,16 +53,16 @@
}
},
"dependencies": {
"@aws-cdk/core": "~1.61.1",
"@aws-cdk/aws-apigateway": "~1.61.1",
"@aws-cdk/aws-iam": "~1.61.1",
"@aws-cdk/aws-dynamodb": "~1.61.1",
"@aws-cdk/aws-logs": "~1.61.1",
"@aws-solutions-constructs/core": "~1.61.1",
"@aws-cdk/core": "~1.62.0",
"@aws-cdk/aws-apigateway": "~1.62.0",
"@aws-cdk/aws-iam": "~1.62.0",
"@aws-cdk/aws-dynamodb": "~1.62.0",
"@aws-cdk/aws-logs": "~1.62.0",
"@aws-solutions-constructs/core": "~1.62.0",
"constructs": "^3.0.4"
},
"devDependencies": {
"@aws-cdk/assert": "~1.61.1",
"@aws-cdk/assert": "~1.62.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -72,12 +72,12 @@
]
},
"peerDependencies": {
"@aws-cdk/core": "~1.61.1",
"@aws-cdk/aws-apigateway": "~1.61.1",
"@aws-cdk/aws-iam": "~1.61.1",
"@aws-cdk/aws-dynamodb": "~1.61.1",
"@aws-solutions-constructs/core": "~1.61.1",
"@aws-cdk/core": "~1.62.0",
"@aws-cdk/aws-apigateway": "~1.62.0",
"@aws-cdk/aws-iam": "~1.62.0",
"@aws-cdk/aws-dynamodb": "~1.62.0",
"@aws-solutions-constructs/core": "~1.62.0",
"constructs": "^3.0.4",
"@aws-cdk/aws-logs": "~1.61.1"
"@aws-cdk/aws-logs": "~1.62.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ _Parameters_

| **Method** | **Request Path** | **Request Body** | **Stream Action** | **Description** |
|:-------------|:----------------|-----------------|-----------------|-----------------|
|POST|`/record`| `{ "data": "Hello World!", "partitionKey": "pk001 }` |`kinesis:PutRecord`|Writes a single data record into the stream.|
|POST|`/records`| `{ "records": [{ "data": "abc", "partitionKey": "pk001" }, { "data": "xyz", "partitionKeyID": "pk001" }] }` |`kinesis:PutRecords`|Writes multiple data records into the stream in a single call.|
|POST|`/record`| `{ "data": "Hello World!", "partitionKey": "pk001" }` |`kinesis:PutRecord`|Writes a single data record into the stream.|
|POST|`/records`| `{ "records": [{ "data": "abc", "partitionKey": "pk001" }, { "data": "xyz", "partitionKey": "pk001" }] }` |`kinesis:PutRecords`|Writes multiple data records into the stream in a single call.|

## Default settings
Out of the box implementation of the Construct without any override will set the following defaults:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,36 @@ export interface ApiGatewayToKinesisStreamsProps {
* API Gateway request template for the PutRecord action.
* If not provided, a default one will be used.
*
* @default - None
* @default - { "StreamName": "${this.kinesisStream.streamName}", "Data": "$util.base64Encode($input.json('$.data'))",
* "PartitionKey": "$input.path('$.partitionKey')" }
*/
readonly putRecordRequestTemplate?: string;

/**
* API Gateway request model for the PutRecord action.
* If not provided, a default one will be created.
*
* @default - None
* @default - {"$schema":"http://json-schema.org/draft-04/schema#","title":"PutRecord proxy single-record payload","type":"object",
* "required":["data","partitionKey"],"properties":{"data":{"type":"string"},"partitionKey":{"type":"string"}}}
*/
readonly putRecordRequestModel?: api.ModelOptions;

/**
* API Gateway request template for the PutRecords action.
* If not provided, a default one will be used.
*
* @default - None
* @default - { "StreamName": "${this.kinesisStream.streamName}", "Records": [ #foreach($elem in $input.path('$.records'))
* { "Data": "$util.base64Encode($elem.data)", "PartitionKey": "$elem.partitionKey"}#if($foreach.hasNext),#end #end ] }
*/
readonly putRecordsRequestTemplate?: string;

/**
* API Gateway request model for the PutRecords action.
* If not provided, a default one will be created.
*
* @default - None
* @default - {"$schema":"http://json-schema.org/draft-04/schema#","title":"PutRecords proxy payload data","type":"object","required":["records"],
* "properties":{"records":{"type":"array","items":{"type":"object",
* "required":["data","partitionKey"],"properties":{"data":{"type":"string"},"partitionKey":{"type":"string"}}}}}}
*/
readonly putRecordsRequestModel?: api.ModelOptions;

Expand Down Expand Up @@ -92,7 +97,7 @@ export class ApiGatewayToKinesisStreams extends Construct {
* @param {cdk.App} scope - represents the scope for all the resources.
* @param {string} id - this is a a scope-unique id.
* @param {ApiGatewayToKinesisStreamsProps} props - user provided props for the construct.
* @since 1.61.1
* @since 1.62.0
* @access public
*/
constructor(scope: Construct, id: string, props: ApiGatewayToKinesisStreamsProps) {
Expand Down Expand Up @@ -150,7 +155,7 @@ export class ApiGatewayToKinesisStreams extends Construct {

private getPutRecordTemplate(putRecordTemplate?: string): string {
if (putRecordTemplate !== undefined) {
return putRecordTemplate;
return putRecordTemplate.replace("${StreamName}", this.kinesisStream.streamName);
}

return `{ "StreamName": "${this.kinesisStream.streamName}", "Data": "$util.base64Encode($input.json('$.data'))", "PartitionKey": "$input.path('$.partitionKey')" }`;
Expand Down Expand Up @@ -184,7 +189,7 @@ export class ApiGatewayToKinesisStreams extends Construct {

private getPutRecordsTemplate(putRecordsTemplate?: string): string {
if (putRecordsTemplate !== undefined) {
return putRecordsTemplate;
return putRecordsTemplate.replace("${StreamName}", this.kinesisStream.streamName);
}

return `{ "StreamName": "${this.kinesisStream.streamName}", "Records": [ #foreach($elem in $input.path('$.records')) { "Data": "$util.base64Encode($elem.data)", "PartitionKey": "$elem.partitionKey"}#if($foreach.hasNext),#end #end ] }`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-apigateway-kinesisstreams",
"version": "1.61.1",
"version": "1.62.0",
"description": "CDK Constructs for AWS API Gateway and Amazon Kinesis Data Streams integration.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,16 +53,16 @@
}
},
"dependencies": {
"@aws-cdk/core": "~1.61.1",
"@aws-cdk/aws-apigateway": "~1.61.1",
"@aws-cdk/aws-iam": "~1.61.1",
"@aws-cdk/aws-kinesis": "~1.61.1",
"@aws-cdk/aws-logs": "~1.61.1",
"@aws-solutions-constructs/core": "~1.61.1",
"@aws-cdk/core": "~1.62.0",
"@aws-cdk/aws-apigateway": "~1.62.0",
"@aws-cdk/aws-iam": "~1.62.0",
"@aws-cdk/aws-kinesis": "~1.62.0",
"@aws-cdk/aws-logs": "~1.62.0",
"@aws-solutions-constructs/core": "~1.62.0",
"constructs": "^3.0.4"
},
"devDependencies": {
"@aws-cdk/assert": "~1.61.1",
"@aws-cdk/assert": "~1.62.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -72,12 +72,12 @@
]
},
"peerDependencies": {
"@aws-cdk/core": "~1.61.1",
"@aws-cdk/aws-apigateway": "~1.61.1",
"@aws-cdk/aws-iam": "~1.61.1",
"@aws-cdk/aws-kinesis": "~1.61.1",
"@aws-solutions-constructs/core": "~1.61.1",
"@aws-cdk/core": "~1.62.0",
"@aws-cdk/aws-apigateway": "~1.62.0",
"@aws-cdk/aws-iam": "~1.62.0",
"@aws-cdk/aws-kinesis": "~1.62.0",
"@aws-solutions-constructs/core": "~1.62.0",
"constructs": "^3.0.4",
"@aws-cdk/aws-logs": "~1.61.1"
"@aws-cdk/aws-logs": "~1.62.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"Name": "my-api"
}
},
"testapigatewaykinesisoverwriteRestApiDeployment1EE3B0963b59c487316048a0c96d810cbd1cf3bb": {
"testapigatewaykinesisoverwriteRestApiDeployment1EE3B096ca960d6e964dacd9ef8ada66856cca97": {
"Type": "AWS::ApiGateway::Deployment",
"Properties": {
"RestApiId": {
Expand Down Expand Up @@ -61,7 +61,7 @@
"Format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"user\":\"$context.identity.user\",\"caller\":\"$context.identity.caller\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"resourcePath\":\"$context.resourcePath\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\"}"
},
"DeploymentId": {
"Ref": "testapigatewaykinesisoverwriteRestApiDeployment1EE3B0963b59c487316048a0c96d810cbd1cf3bb"
"Ref": "testapigatewaykinesisoverwriteRestApiDeployment1EE3B096ca960d6e964dacd9ef8ada66856cca97"
},
"MethodSettings": [
{
Expand Down Expand Up @@ -132,7 +132,18 @@
"integration.request.header.Content-Type": "'x-amz-json-1.1'"
},
"RequestTemplates": {
"application/json": "{ \"Data\": \"$util.base64Encode($input.json('$.foo'))\", \"PartitionKey\": \"$input.path('$.bar')\" }"
"application/json": {
"Fn::Join": [
"",
[
"{ \"StreamName\": \"",
{
"Ref": "KinesisStream46752A3E"
},
"\", \"Data\": \"$util.base64Encode($input.json('$.foo'))\", \"PartitionKey\": \"$input.path('$.bar')\" }"
]
]
}
},
"Type": "AWS",
"Uri": {
Expand Down Expand Up @@ -227,7 +238,18 @@
"integration.request.header.Content-Type": "'x-amz-json-1.1'"
},
"RequestTemplates": {
"application/json": "{ \"Records\": [ #foreach($elem in $input.path('$.records')) { \"Data\": \"$util.base64Encode($elem.foo)\", \"PartitionKey\": \"$elem.bar\"}#if($foreach.hasNext),#end #end ] }"
"application/json": {
"Fn::Join": [
"",
[
"{ \"StreamName\": \"",
{
"Ref": "KinesisStream46752A3E"
},
"\", \"Records\": [ #foreach($elem in $input.path('$.records')) { \"Data\": \"$util.base64Encode($elem.foo)\", \"PartitionKey\": \"$elem.bar\"}#if($foreach.hasNext),#end #end ] }"
]
]
}
},
"Type": "AWS",
"Uri": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ const props: ApiGatewayToKinesisStreamsProps = {
shardCount: 1,
retentionPeriod: Duration.days(4)
},
putRecordRequestTemplate: `{ "Data": "$util.base64Encode($input.json('$.foo'))", "PartitionKey": "$input.path('$.bar')" }`,
putRecordRequestTemplate: `{ "StreamName": "\${StreamName}", "Data": "$util.base64Encode($input.json('$.foo'))", "PartitionKey": "$input.path('$.bar')" }`,
putRecordRequestModel: { schema: {} },

putRecordsRequestTemplate: `{ "Records": [ #foreach($elem in $input.path('$.records')) { "Data": "$util.base64Encode($elem.foo)", "PartitionKey": "$elem.bar"}#if($foreach.hasNext),#end #end ] }`,
putRecordsRequestTemplate: `{ "StreamName": "\${StreamName}", "Records": [ #foreach($elem in $input.path('$.records')) { "Data": "$util.base64Encode($elem.foo)", "PartitionKey": "$elem.bar"}#if($foreach.hasNext),#end #end ] }`,
putRecordsRequestModel: { schema: {} }
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-apigateway-lambda",
"version": "1.61.1",
"version": "1.62.0",
"description": "CDK constructs for defining an interaction between an API Gateway and a Lambda function.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,16 +53,16 @@
}
},
"dependencies": {
"@aws-cdk/aws-apigateway": "~1.61.1",
"@aws-cdk/aws-lambda": "~1.61.1",
"@aws-cdk/aws-logs": "~1.61.1",
"@aws-cdk/core": "~1.61.1",
"@aws-cdk/aws-iam": "~1.61.1",
"@aws-solutions-constructs/core": "~1.61.1",
"@aws-cdk/aws-apigateway": "~1.62.0",
"@aws-cdk/aws-lambda": "~1.62.0",
"@aws-cdk/aws-logs": "~1.62.0",
"@aws-cdk/core": "~1.62.0",
"@aws-cdk/aws-iam": "~1.62.0",
"@aws-solutions-constructs/core": "~1.62.0",
"constructs": "^3.0.4"
},
"devDependencies": {
"@aws-cdk/assert": "~1.61.1",
"@aws-cdk/assert": "~1.62.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -72,12 +72,12 @@
]
},
"peerDependencies": {
"@aws-cdk/aws-apigateway": "~1.61.1",
"@aws-cdk/aws-lambda": "~1.61.1",
"@aws-cdk/aws-logs": "~1.61.1",
"@aws-cdk/core": "~1.61.1",
"@aws-solutions-constructs/core": "~1.61.1",
"@aws-cdk/aws-apigateway": "~1.62.0",
"@aws-cdk/aws-lambda": "~1.62.0",
"@aws-cdk/aws-logs": "~1.62.0",
"@aws-cdk/core": "~1.62.0",
"@aws-solutions-constructs/core": "~1.62.0",
"constructs": "^3.0.4",
"@aws-cdk/aws-iam": "~1.61.1"
"@aws-cdk/aws-iam": "~1.62.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-apigateway-sqs",
"version": "1.61.1",
"version": "1.62.0",
"description": "CDK constructs for defining an interaction between an AWS Lambda function and an Amazon S3 bucket.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -53,17 +53,17 @@
}
},
"dependencies": {
"@aws-cdk/aws-apigateway": "~1.61.1",
"@aws-cdk/aws-sqs": "~1.61.1",
"@aws-cdk/aws-kms": "~1.61.1",
"@aws-cdk/aws-iam": "~1.61.1",
"@aws-cdk/aws-logs": "~1.61.1",
"@aws-cdk/core": "~1.61.1",
"@aws-solutions-constructs/core": "~1.61.1",
"@aws-cdk/aws-apigateway": "~1.62.0",
"@aws-cdk/aws-sqs": "~1.62.0",
"@aws-cdk/aws-kms": "~1.62.0",
"@aws-cdk/aws-iam": "~1.62.0",
"@aws-cdk/aws-logs": "~1.62.0",
"@aws-cdk/core": "~1.62.0",
"@aws-solutions-constructs/core": "~1.62.0",
"constructs": "^3.0.4"
},
"devDependencies": {
"@aws-cdk/assert": "~1.61.1",
"@aws-cdk/assert": "~1.62.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -73,13 +73,13 @@
]
},
"peerDependencies": {
"@aws-cdk/aws-apigateway": "~1.61.1",
"@aws-cdk/aws-sqs": "~1.61.1",
"@aws-cdk/aws-kms": "~1.61.1",
"@aws-cdk/aws-iam": "~1.61.1",
"@aws-cdk/core": "~1.61.1",
"@aws-solutions-constructs/core": "~1.61.1",
"@aws-cdk/aws-apigateway": "~1.62.0",
"@aws-cdk/aws-sqs": "~1.62.0",
"@aws-cdk/aws-kms": "~1.62.0",
"@aws-cdk/aws-iam": "~1.62.0",
"@aws-cdk/core": "~1.62.0",
"@aws-solutions-constructs/core": "~1.62.0",
"constructs": "^3.0.4",
"@aws-cdk/aws-logs": "~1.61.1"
"@aws-cdk/aws-logs": "~1.62.0"
}
}
Loading

0 comments on commit c7aa9ae

Please sign in to comment.