Skip to content

Commit

Permalink
Update to version v1.49.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hnishar committed Jul 9, 2020
1 parent c701e80 commit 61eaccc
Show file tree
Hide file tree
Showing 140 changed files with 926 additions and 1,106 deletions.
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@ 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.49.0] - 2020-07-09

### Changed
- Upgraded all patterns to CDK v1.49.0
- BREAKING CHANGE: Removed `deployLambda` and `deployBucket` from all patterns Construct Props
- Added `tablePermissions` to aws-lambda-dynamodb & aws-iot-lambda-dynamodb for fine-grained table permissions to grant to the lambda function

## [1.48.0] - 2020-07-06

### Added
- Upgraded all patterns to CDK v1.48.0
- aws-lambda-step-function pattern added

### Changed
- Upgraded all patterns to CDK v1.48.0
- Fix for aws-sqs-lambda pattern bug when using FIFO queue ([#13](https://github.com/awslabs/aws-solutions-constructs/pull/13))
- Minor updates to CONTRIBUTING.md and deployment/build-patterns.sh

## [1.47.0] - 2020-06-25

### Added
- Upgraded all patterns to CDK v1.47.0

### Changed
- Upgraded all patterns to CDK v1.47.0
- Adding ability to provide a dynamodb table ([#8](https://github.com/awslabs/aws-solutions-constructs/pull/8))
- Fix bug in s3BucketWithLogging function ([#9](https://github.com/awslabs/aws-solutions-constructs/pull/9))

Expand All @@ -30,10 +35,10 @@ General Availability of the AWS Solutions Constructs!! 🎉🎉🥂🥂🍾🍾
### Added
- aws-events-rule-step-function pattern added
- aws-s3-step-function pattern added
- Upgraded all patterns to CDK v1.46.0
- Renamed the Github repo and NPM, PyPi & Maven namespaces to AWS Solutions Constructs

### Changed
- Upgraded all patterns to CDK v1.46.0
- Changed the default encryption setting for Amazon SQS & Amazon Kinesis to use AWS Managed KMS Key
- Updated READMEs for all patterns to include Default settings section
- For all patterns, converted the getter methods to properties; used for retrieving the underlying AWS Resource object(s) created by the Solutions Constructs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ This library includes a collection of functional use case implementations to dem
* Use case pattern: https://github.com/awslabs/aws-solutions-constructs/tree/master/source/use_cases/aws-serverless-web-app

***
© Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
© Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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.48.0"
"version": "1.49.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.48.0",
"version": "1.49.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.48.0",
"version": "1.49.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,15 +53,15 @@
}
},
"dependencies": {
"@aws-cdk/core": "~1.48.0",
"@aws-cdk/aws-apigateway": "~1.48.0",
"@aws-cdk/aws-iam": "~1.48.0",
"@aws-cdk/aws-dynamodb": "~1.48.0",
"@aws-solutions-constructs/core": "~1.48.0",
"@aws-cdk/core": "~1.49.0",
"@aws-cdk/aws-apigateway": "~1.49.0",
"@aws-cdk/aws-iam": "~1.49.0",
"@aws-cdk/aws-dynamodb": "~1.49.0",
"@aws-solutions-constructs/core": "~1.49.0",
"constructs": "^3.0.2"
},
"devDependencies": {
"@aws-cdk/assert": "~1.48.0",
"@aws-cdk/assert": "~1.49.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -71,11 +71,11 @@
]
},
"peerDependencies": {
"@aws-cdk/core": "~1.48.0",
"@aws-cdk/aws-apigateway": "~1.48.0",
"@aws-cdk/aws-iam": "~1.48.0",
"@aws-cdk/aws-dynamodb": "~1.48.0",
"@aws-solutions-constructs/core": "~1.48.0",
"@aws-cdk/core": "~1.49.0",
"@aws-cdk/aws-apigateway": "~1.49.0",
"@aws-cdk/aws-iam": "~1.49.0",
"@aws-cdk/aws-dynamodb": "~1.49.0",
"@aws-solutions-constructs/core": "~1.49.0",
"constructs": "^3.0.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Here is a minimal deployable pattern definition:
const { ApiGatewayToLambda } = require('@aws-solutions-constructs/aws-apigateway-lambda');

new ApiGatewayToLambda(stack, 'ApiGatewayToLambdaPattern', {
deployLambda: true,
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'index.handler',
Expand All @@ -58,9 +57,8 @@ _Parameters_

| **Name** | **Type** | **Description** |
|:-------------|:----------------|-----------------|
|deployLambda|`boolean`|Whether to create a new Lambda function or use an existing Lambda function. If set to false, you must provide an existing function for the `existingLambdaObj` property.|
|existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|An optional, existing Lambda function. This property is required if `deployLambda` is set to false.|
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|Optional user-provided props to override the default props for the Lambda function. This property is only required if `deployLambda` is set to true.|
|existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object, if this is set then the lambdaFunctionProps is ignored.|
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
|apiGatewayProps?|[`api.LambdaRestApiProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.LambdaRestApi.html)|Optional user-provided props to override the default props for the API.|

## Pattern Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,13 @@ import { Construct } from '@aws-cdk/core';
*/
export interface ApiGatewayToLambdaProps {
/**
* Whether to create a new Lambda function or use an existing Lambda function.
* If set to false, you must provide an existing function for the `existingLambdaObj` property.
*
* @default - true
*/
readonly deployLambda: boolean,
/**
* An optional, existing Lambda function.
* This property is required if `deployLambda` is set to false.
* Existing instance of Lambda Function object, if this is set then the lambdaFunctionProps is ignored.
*
* @default - None
*/
readonly existingLambdaObj?: lambda.Function,
/**
* Optional user-provided props to override the default props for the Lambda function.
* This property is only required if `deployLambda` is set to true.
* User provided props to override the default props for the Lambda function.
*
* @default - Default props are used.
*/
Expand Down Expand Up @@ -70,7 +61,6 @@ export class ApiGatewayToLambda extends Construct {

// Setup the Lambda function
this.lambdaFunction = defaults.buildLambdaFunction(this, {
deployLambda: props.deployLambda,
existingLambdaObj: props.existingLambdaObj,
lambdaFunctionProps: props.lambdaFunctionProps
});
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.48.0",
"version": "1.49.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,15 +53,15 @@
}
},
"dependencies": {
"@aws-cdk/aws-apigateway": "~1.48.0",
"@aws-cdk/aws-lambda": "~1.48.0",
"@aws-cdk/aws-logs": "~1.48.0",
"@aws-cdk/core": "~1.48.0",
"@aws-solutions-constructs/core": "~1.48.0",
"@aws-cdk/aws-apigateway": "~1.49.0",
"@aws-cdk/aws-lambda": "~1.49.0",
"@aws-cdk/aws-logs": "~1.49.0",
"@aws-cdk/core": "~1.49.0",
"@aws-solutions-constructs/core": "~1.49.0",
"constructs": "^3.0.2"
},
"devDependencies": {
"@aws-cdk/assert": "~1.48.0",
"@aws-cdk/assert": "~1.49.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -71,11 +71,11 @@
]
},
"peerDependencies": {
"@aws-cdk/aws-apigateway": "~1.48.0",
"@aws-cdk/aws-lambda": "~1.48.0",
"@aws-cdk/aws-logs": "~1.48.0",
"@aws-cdk/core": "~1.48.0",
"@aws-solutions-constructs/core": "~1.48.0",
"@aws-cdk/aws-apigateway": "~1.49.0",
"@aws-cdk/aws-lambda": "~1.49.0",
"@aws-cdk/aws-logs": "~1.49.0",
"@aws-cdk/core": "~1.49.0",
"@aws-solutions-constructs/core": "~1.49.0",
"constructs": "^3.0.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ stack.templateOptions.description = 'Integration Test for aws-apigateway-lambda'

// Definitions
const props: ApiGatewayToLambdaProps = {
deployLambda: true,
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'index.handler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const func = defaults.deployLambdaFunction(stack, lambdaFunctionProps);

// Api gateway setup
const props: ApiGatewayToLambdaProps = {
deployLambda: false,
existingLambdaObj: func
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ test('Pattern deployment with new Lambda function', () => {
// Initial Setup
const stack = new Stack();
const props: ApiGatewayToLambdaProps = {
deployLambda: true,
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'index.handler',
Expand All @@ -49,7 +48,6 @@ test('Pattern deployment with existing Lambda function', () => {
code: lambda.Code.asset(`${__dirname}/lambda`)
});
const props: ApiGatewayToLambdaProps = {
deployLambda: false,
existingLambdaObj: fn
};
new ApiGatewayToLambda(stack, 'test-apigateway-lambda', props);
Expand All @@ -58,14 +56,12 @@ test('Pattern deployment with existing Lambda function', () => {
});

// --------------------------------------------------------------
// Test for error with deployLambda=false and
// existingLambdaObj=undefined (not supplied by user).
// Test for error with existingLambdaObj=undefined (not supplied by user).
// --------------------------------------------------------------
test('Error on deployLambda=false and existingLambdaObj=undefined', () => {
test('Error on existingLambdaObj=undefined', () => {
// Initial Setup
const stack = new Stack();
const props: ApiGatewayToLambdaProps = {
deployLambda: false
};
const app = () => {
new ApiGatewayToLambda(stack, 'test-apigateway-lambda', props);
Expand All @@ -75,13 +71,12 @@ test('Error on deployLambda=false and existingLambdaObj=undefined', () => {
});

// --------------------------------------------------------------
// Test deployLambda=true with lambdaFunctionProps.
// Test with lambdaFunctionProps.
// --------------------------------------------------------------
test('Test deployLambda=true with lambdaFunctionProps', () => {
test('Test with lambdaFunctionProps', () => {
// Initial Setup
const stack = new Stack();
const props: ApiGatewayToLambdaProps = {
deployLambda: true,
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'index.handler',
Expand All @@ -106,7 +101,6 @@ test('Test properties', () => {
// Initial Setup
const stack = new Stack();
const props: ApiGatewayToLambdaProps = {
deployLambda: true,
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'index.handler',
Expand All @@ -121,14 +115,12 @@ test('Test properties', () => {
});

// --------------------------------------------------------------
// Test for error with deployLambda=true and
// lambdaFunctionProps=undefined (not supplied by user).
// Test for error with lambdaFunctionProps=undefined (not supplied by user).
// --------------------------------------------------------------
test('Error on deployLambda=true and lambdaFunctionProps=undefined', () => {
test('Error on lambdaFunctionProps=undefined', () => {
// Initial Setup
const stack = new Stack();
const props: ApiGatewayToLambdaProps = {
deployLambda: true
};
const app = () => {
new ApiGatewayToLambda(stack, 'test-apigateway-lambda', props);
Expand All @@ -144,7 +136,6 @@ test('Pattern deployment with two ApiGatewayToLambda constructs', () => {
// Initial Setup
const stack = new Stack();
const props1: ApiGatewayToLambdaProps = {
deployLambda: true,
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'index.handler',
Expand All @@ -154,7 +145,6 @@ test('Pattern deployment with two ApiGatewayToLambda constructs', () => {
new ApiGatewayToLambda(stack, 'pattern1', props1);

const props2: ApiGatewayToLambdaProps = {
deployLambda: true,
lambdaFunctionProps: {
runtime: lambda.Runtime.NODEJS_10_X,
handler: 'index.handler',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-solutions-constructs/aws-apigateway-sqs",
"version": "1.48.0",
"version": "1.49.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,16 +53,16 @@
}
},
"dependencies": {
"@aws-cdk/aws-apigateway": "~1.48.0",
"@aws-cdk/aws-sqs": "~1.48.0",
"@aws-cdk/aws-kms": "~1.48.0",
"@aws-cdk/aws-iam": "~1.48.0",
"@aws-cdk/core": "~1.48.0",
"@aws-solutions-constructs/core": "~1.48.0",
"@aws-cdk/aws-apigateway": "~1.49.0",
"@aws-cdk/aws-sqs": "~1.49.0",
"@aws-cdk/aws-kms": "~1.49.0",
"@aws-cdk/aws-iam": "~1.49.0",
"@aws-cdk/core": "~1.49.0",
"@aws-solutions-constructs/core": "~1.49.0",
"constructs": "^3.0.2"
},
"devDependencies": {
"@aws-cdk/assert": "~1.48.0",
"@aws-cdk/assert": "~1.49.0",
"@types/jest": "^24.0.23",
"@types/node": "^10.3.0"
},
Expand All @@ -72,12 +72,12 @@
]
},
"peerDependencies": {
"@aws-cdk/aws-apigateway": "~1.48.0",
"@aws-cdk/aws-sqs": "~1.48.0",
"@aws-cdk/aws-kms": "~1.48.0",
"@aws-cdk/aws-iam": "~1.48.0",
"@aws-cdk/core": "~1.48.0",
"@aws-solutions-constructs/core": "~1.48.0",
"@aws-cdk/aws-apigateway": "~1.49.0",
"@aws-cdk/aws-sqs": "~1.49.0",
"@aws-cdk/aws-kms": "~1.49.0",
"@aws-cdk/aws-iam": "~1.49.0",
"@aws-cdk/core": "~1.49.0",
"@aws-solutions-constructs/core": "~1.49.0",
"constructs": "^3.0.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const lambdaProps: lambda.FunctionProps = {

new CloudFrontToApiGatewayToLambda(stack, 'test-cloudfront-apigateway-lambda', {
lambdaFunctionProps: lambdaProps,
deployLambda: true
});
```

Expand All @@ -60,9 +59,8 @@ _Parameters_

| **Name** | **Type** | **Description** |
|:-------------|:----------------|-----------------|
|deployLambda|`boolean`|Whether to create a new Lambda function or use an existing Lambda function|
|existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object|
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|Optional user provided props to override the default props for Lambda function|
|existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object, if this is set then the lambdaFunctionProps is ignored.|
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
|apiGatewayProps?|[`api.LambdaRestApiProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.LambdaRestApiProps.html)|Optional user provided props to override the default props for API Gateway|
|cloudFrontDistributionProps?|[`cloudfront.CloudFrontWebDistributionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudfront.CloudFrontWebDistributionProps.html)|Optional user provided props to override the default props for CloudFront Distribution|
|insertHttpSecurityHeaders?|`boolean`|Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from CloudFront|
Expand Down
Loading

0 comments on commit 61eaccc

Please sign in to comment.