Skip to content

Commit

Permalink
Update to version v1.82.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hnishar committed Jan 21, 2021
1 parent 903df91 commit 6cc64e7
Show file tree
Hide file tree
Showing 99 changed files with 2,618 additions and 1,305 deletions.
17 changes: 7 additions & 10 deletions .viperlightignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@ node_modules/
deployment/publishing/nuget/publish.sh:43
deployment/publishing/nuget/publish.sh:44
source/use_cases/aws-serverless-web-app/test/integ.backend-deployment.expected.json:180
source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.deployFunction.expected.json:182
source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.existingFunction.expected.json:182
source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apigateway-sqs-crud.expected.json:121
source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.no-arguments.expected.json:182
source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.deployFunction.expected.json:196
source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.existingFunction.expected.json:196
source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.no-arguments.expected.json:196
CODE_OF_CONDUCT.md:4
CONTRIBUTING.md:217
source/patterns/@aws-solutions-constructs/core/test/step-function-helper.test.ts:118
source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apigateway-sqs-crud.expected.json:41
source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.deployFunction.expected.json:112
source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.existingFunction.expected.json:112
source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apigateway-sqs-crud.expected.json:163
source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apigateway-sqs-crud.expected.json:179
source/patterns/@aws-solutions-constructs/aws-apigateway-sqs/test/integ.apigateway-sqs-crud.expected.json:193
source/tools/cdk-integ-tools/package-lock.json:373
source/patterns/@aws-solutions-constructs/core/test/step-function-helper.test.js:115
source/patterns/@aws-solutions-constructs/core/test/lambda-helper.test.ts:296
Expand All @@ -29,10 +26,10 @@ source/patterns/@aws-solutions-constructs/aws-events-rule-sns/test/events-rule-s
source/patterns/@aws-solutions-constructs/aws-events-rule-sqs/test/events-rule-sqs-queue.test.ts:131
source/patterns/@aws-solutions-constructs/aws-dynamodb-stream-lambda/test/dynamodb-stream-lambda.test.ts:105
source/patterns/@aws-solutions-constructs/aws-apigateway-iot/README.md:39
source/patterns/@aws-solutions-constructs/aws-apigateway-iot/test/integ.defaultParams.expected.json:252
source/patterns/@aws-solutions-constructs/aws-apigateway-iot/test/integ.overrideParams.expected.json:255
source/patterns/@aws-solutions-constructs/aws-apigateway-iot/test/integ.defaultParams.expected.json:266
source/patterns/@aws-solutions-constructs/aws-apigateway-iot/test/integ.overrideParams.expected.json:269
source/patterns/@aws-solutions-constructs/aws-apigateway-iot/test/test.apigateway-iot.test.ts:29
source/patterns/@aws-solutions-constructs/aws-apigateway-iot/test/integ.override_auth_api_keys.expected.json:253
source/patterns/@aws-solutions-constructs/aws-apigateway-iot/test/integ.override_auth_api_keys.expected.json:267
source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/test.cloudfront-s3.test.ts:106
source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-s3-helper.test.ts:202
source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/test.s3-sqs.test.ts:251
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 1.82.0 (2021-01-21)

### Changed
- Upgraded all patterns to CDK v1.82.0
- Fixed the issue related to Cfn Nag warnings related to CloudWatchLogs for all patterns ([#121](https://github.com/awslabs/aws-solutions-constructs/issues/121))

## 1.81.0 (2021-01-14)

### Changed
Expand Down
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.81.0"
"version": "1.82.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ _Parameters_
|allowUpdateOperation|`boolean`|Whether to deploy API Gateway Method for Update operation on DynamoDB table.|
|updateRequestTemplate|`string`|API Gateway Request template for Update method, required if allowUpdateOperation set to true|
|allowDeleteOperation|`boolean`|Whether to deploy API Gateway Method for Delete operation on DynamoDB table.|
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|

## Pattern Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import * as defaults from '@aws-solutions-constructs/core';
import { Construct } from '@aws-cdk/core';
import * as dynamodb from '@aws-cdk/aws-dynamodb';
import { getPartitionKeyNameFromTable, overrideProps } from '@aws-solutions-constructs/core';
import { LogGroup } from '@aws-cdk/aws-logs';
import * as logs from '@aws-cdk/aws-logs';

/**
* @summary The properties for the ApiGatewayToDynamoDB class.
Expand All @@ -41,48 +41,48 @@ export interface ApiGatewayToDynamoDBProps {
* @default - Default properties are used.
*/
readonly apiGatewayProps?: api.RestApiProps,

/**
* Whether to deploy API Gateway Method for Create operation on DynamoDB table.
*
* @default - false
*/
readonly allowCreateOperation?: boolean,

/**
* API Gateway Request template for Create method, required if allowCreateOperation set to true
*
* @default - None
*/
readonly createRequestTemplate?: string,

/**
* Whether to deploy API Gateway Method for Read operation on DynamoDB table.
*
* @default - true
*/
readonly allowReadOperation?: boolean,

/**
* Whether to deploy API Gateway Method for Update operation on DynamoDB table.
*
* @default - false
*/
readonly allowUpdateOperation?: boolean,

/**
* API Gateway Request template for Update method, required if allowUpdateOperation set to true
*
* @default - None
*/
readonly updateRequestTemplate?: string,

/**
* Whether to deploy API Gateway Method for Delete operation on DynamoDB table.
*
* @default - false
*/
readonly allowDeleteOperation?: boolean
readonly allowDeleteOperation?: boolean,
/**
* User provided props to override the default props for the CloudWatchLogs LogGroup.
*
* @default - Default props are used
*/
readonly logGroupProps?: logs.LogGroupProps
}

/**
Expand All @@ -93,7 +93,7 @@ export class ApiGatewayToDynamoDB extends Construct {
public readonly apiGatewayRole: iam.Role;
public readonly apiGateway: api.RestApi;
public readonly apiGatewayCloudWatchRole: iam.Role;
public readonly apiGatewayLogGroup: LogGroup;
public readonly apiGatewayLogGroup: logs.LogGroup;
/**
* @summary Constructs a new instance of the ApiGatewayToDynamoDB class.
* @param {cdk.App} scope - represents the scope for all the resources.
Expand Down Expand Up @@ -126,7 +126,8 @@ export class ApiGatewayToDynamoDB extends Construct {
});

// Setup the API Gateway
[this.apiGateway, this.apiGatewayCloudWatchRole, this.apiGatewayLogGroup] = defaults.GlobalRestApi(this, props.apiGatewayProps);
[this.apiGateway, this.apiGatewayCloudWatchRole, this.apiGatewayLogGroup] = defaults.GlobalRestApi(this,
props.apiGatewayProps, props.logGroupProps);

// Setup the API Gateway role
this.apiGatewayRole = new iam.Role(this, 'api-gateway-role', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ Object {
"Resources": Object {
"testapigatewaydynamodbdefaultApiAccessLogGroup0192183A": Object {
"DeletionPolicy": "Retain",
"Metadata": Object {
"cfn_nag": Object {
"rules_to_suppress": Array [
Object {
"id": "W86",
"reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely",
},
Object {
"id": "W84",
"reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)",
},
],
},
},
"Type": "AWS::Logs::LogGroup",
"UpdateReplacePolicy": "Retain",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,21 @@
"testapigatewaydynamodbApiAccessLogGroup3F457756": {
"Type": "AWS::Logs::LogGroup",
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
"DeletionPolicy": "Retain",
"Metadata": {
"cfn_nag": {
"rules_to_suppress": [
{
"id": "W86",
"reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
},
{
"id": "W84",
"reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
}
]
}
}
},
"testapigatewaydynamodbRestApi80489300": {
"Type": "AWS::ApiGateway::RestApi",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,21 @@
"testapigatewaydynamodbdefaultApiAccessLogGroup0192183A": {
"Type": "AWS::Logs::LogGroup",
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
"DeletionPolicy": "Retain",
"Metadata": {
"cfn_nag": {
"rules_to_suppress": [
{
"id": "W86",
"reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
},
{
"id": "W84",
"reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
}
]
}
}
},
"testapigatewaydynamodbdefaultRestApi9102FDF9": {
"Type": "AWS::ApiGateway::RestApi",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,21 @@
"testapigatewaydynamodbdefaultApiAccessLogGroup0192183A": {
"Type": "AWS::Logs::LogGroup",
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
"DeletionPolicy": "Retain",
"Metadata": {
"cfn_nag": {
"rules_to_suppress": [
{
"id": "W86",
"reason": "Retention period for CloudWatchLogs LogGroups are set to 'Never Expire' to preserve customer data indefinitely"
},
{
"id": "W84",
"reason": "By default CloudWatchLogs LogGroups data is encrypted using the CloudWatch server-side encryption keys (AWS Managed Keys)"
}
]
}
}
},
"testapigatewaydynamodbdefaultRestApi9102FDF9": {
"Type": "AWS::ApiGateway::RestApi",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ _Parameters_
|apiGatewayCreateApiKey?|`boolean`|If set to `true`, an API Key is created and associated to a UsagePlan. User should specify `x-api-key` header while accessing RestApi. Default value set to `false`|
|apiGatewayExecutionRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iam.Role.html)|IAM Role used by the API Gateway to access AWS IoT. If not specified, a default role is created with wildcard ('*') access to all topics and things.|
|apiGatewayProps?|[`api.restApiProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.RestApiProps.html)|Optional user-provided props to override the default props for the API Gateway.|
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|

## Pattern Properties

Expand Down
Loading

0 comments on commit 6cc64e7

Please sign in to comment.