Skip to content

Commit

Permalink
chore(release): 1.150.0 (#654)
Browse files Browse the repository at this point in the history
* feat(aws-fargate-dynamodb): create new construct (#633)

* created README for aws-fargate-dynamodb

* created aws-fargate-dynamodb construct

* revised buildDynamoDBTable helper function to support old/new constructs

* updated prop variable name

* added error and endpoint checking tests

* checked for table permissions

* checked props in input-validation

* moved table interface and object check to buildDynamoDBTable function

* created prop check function in dynamo helper file

* chore(release): 1.150.0

* chore(changelog): Updated CHANGELOG.md

* CDK version driven changes

* Align CDK version

* Sync CDk Versions

* Sync CDK versions

Co-authored-by: biffgaut <[email protected]>
Co-authored-by: mickychetta <[email protected]>
  • Loading branch information
3 people authored Apr 9, 2022
1 parent 6364367 commit a22694b
Show file tree
Hide file tree
Showing 26 changed files with 3,878 additions and 51 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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.150.0](https://github.com/awslabs/aws-solutions-constructs/compare/v1.149.0...v1.150.0) (2022-04-08)

* Upgraded all patterns to CDK v1.150.0

### Features

* **aws-fargate-dynamodb:** create new construct ([#633](https://github.com/awslabs/aws-solutions-constructs/issues/633)) ([0b35418](https://github.com/awslabs/aws-solutions-constructs/commit/0b35418b41e24b32b6064a649d77a70f1c6d7bd8))

## [1.149.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.5.0...v1.149.0) (2022-04-07)

* Upgraded all patterns to CDK v1.149.0
Expand Down
2 changes: 1 addition & 1 deletion deployment/v2/align-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const findVersion = process.argv[2];
const replaceVersion = process.argv[3];

// these versions need to be sourced from a config file
const awsCdkLibVersion = '2.15.0';
const awsCdkLibVersion = '2.18.0';
const constructsVersion = '10.0.0';
const MODULE_EXEMPTIONS = new Set([
'@aws-cdk/cloudformation-diff',
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.149.0"
"version": "1.150.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ export class ApiGatewayToDynamoDB extends Construct {
partitionKeyName = getPartitionKeyNameFromTable(props.existingTableObj);
}

// Since we are only invoking this function with an existing Table or tableProps,
// (not a table interface), we know that the implementation will always return
// a Table object and we can safely cast away the optional aspect of the type.
this.dynamoTable = defaults.buildDynamoDBTable(this, {
existingTableObj: props.existingTableObj,
dynamoTableProps,
});
dynamoTableProps: props.dynamoTableProps
})[1] as dynamodb.Table;

// Setup the API Gateway
[this.apiGateway, this.apiGatewayCloudWatchRole, this.apiGatewayLogGroup] = defaults.GlobalRestApi(this,
Expand Down Expand Up @@ -170,7 +173,7 @@ export class ApiGatewayToDynamoDB extends Construct {
readRequestTemplate = props.readRequestTemplate;
} else {
readRequestTemplate =
`{ \
`{ \
"TableName": "${this.dynamoTable.tableName}", \
"KeyConditionExpression": "${partitionKeyName} = :v1", \
"ExpressionAttributeValues": { \
Expand Down Expand Up @@ -212,7 +215,7 @@ export class ApiGatewayToDynamoDB extends Construct {
deleteRequestTemplate = props.deleteRequestTemplate;
} else {
deleteRequestTemplate =
`{ \
`{ \
"TableName": "${this.dynamoTable.tableName}", \
"Key": { \
"${partitionKeyName}": { \
Expand Down Expand Up @@ -240,7 +243,7 @@ export class ApiGatewayToDynamoDB extends Construct {
resources: [
this.dynamoTable.tableArn
],
actions: [ `${action}` ]
actions: [`${action}`]
}));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,28 @@
{
"Action": "lambda:InvokeFunction",
"Effect": "Allow",
"Resource": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
"Resource": [
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
{
"Fn::Join": [
"",
[
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
":*"
]
]
}
]
},
{
"Action": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,28 @@
{
"Action": "lambda:InvokeFunction",
"Effect": "Allow",
"Resource": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
"Resource": [
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
{
"Fn::Join": [
"",
[
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
":*"
]
]
}
]
},
{
"Action": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,28 @@
{
"Action": "lambda:InvokeFunction",
"Effect": "Allow",
"Resource": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
"Resource": [
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
{
"Fn::Join": [
"",
[
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
":*"
]
]
}
]
},
{
"Action": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,28 @@
{
"Action": "lambda:InvokeFunction",
"Effect": "Allow",
"Resource": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
"Resource": [
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
{
"Fn::Join": [
"",
[
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
":*"
]
]
}
]
},
{
"Action": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,28 @@
{
"Action": "lambda:InvokeFunction",
"Effect": "Allow",
"Resource": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
"Resource": [
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
{
"Fn::Join": [
"",
[
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
":*"
]
]
}
]
},
{
"Action": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,28 @@
{
"Action": "lambda:InvokeFunction",
"Effect": "Allow",
"Resource": {
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
}
"Resource": [
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
{
"Fn::Join": [
"",
[
{
"Fn::GetAtt": [
"LambdaFunctionBF21E41F",
"Arn"
]
},
":*"
]
]
}
]
},
{
"Action": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
lib/*.js
test/*.js
*.d.ts
coverage
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
lib/*.js
test/*.js
*.js.map
*.d.ts
node_modules
*.generated.ts
dist
.jsii

.LAST_BUILD
.nyc_output
coverage
.nycrc
.LAST_PACKAGE
*.snk
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Exclude typescript source and config
*.ts
tsconfig.json
coverage
.nyc_output
*.tgz
*.snk
*.tsbuildinfo

# Include javascript files and typescript declarations
!*.js
!*.d.ts

# Exclude jsii outdir
dist

# Include .jsii
!.jsii

# Include .jsii
!.jsii
Loading

0 comments on commit a22694b

Please sign in to comment.