Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored May 19, 2022
2 parents 003c271 + f7693e3 commit 23fa8f8
Show file tree
Hide file tree
Showing 581 changed files with 13,627 additions and 1,541 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "📕 Documentation Issue"
description: Report an issue in the API Reference documentation or Developer Guide
title: "(short issue description)"
title: "(module name): (short issue description)"
labels: [documentation, needs-triage]
assignees: []
body:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: 🚀 Feature Request
description: Suggest an idea for this project
title: "(short issue description)"
title: "(module name): (short issue description)"
labels: [feature-request, needs-triage]
assignees: []
body:
Expand Down
136 changes: 68 additions & 68 deletions .github/workflows/issue-label-assign.yml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .github/workflows/issue-reprioritization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
issue-reprioritization:
permissions:
issues: write
repository-projects: write
runs-on: ubuntu-latest
steps:
- uses: kaizencc/issue-reprioritization-manager@main
Expand All @@ -16,6 +17,7 @@ jobs:
original-label: p2
new-label: p1
reprioritization-threshold: 20
project-column-url: https://github.com/aws/aws-cdk/projects/13#column-18002436
- uses: kaizencc/pr-triage-manager@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/team-owners-assignment.yml

This file was deleted.

16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

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.156.1](https://github.com/aws/aws-cdk/compare/v1.156.0...v1.156.1) (2022-05-12)

## [1.156.0](https://github.com/aws/aws-cdk/compare/v1.155.0...v1.156.0) (2022-05-11)


### Features

* **lambda:** nodejs16.x runtime ([#20261](https://github.com/aws/aws-cdk/issues/20261)) ([edf7c86](https://github.com/aws/aws-cdk/commit/edf7c864f90acc4f29ff78ff0de74e324f8b85ee))


### Bug Fixes

* **appsync:** incorrect region used for imported Cognito user pool ([#20193](https://github.com/aws/aws-cdk/issues/20193)) ([3e0393e](https://github.com/aws/aws-cdk/commit/3e0393e63e84d631545734425482deae687520f1)), closes [#20195](https://github.com/aws/aws-cdk/issues/20195)
* **cognito:** UserPoolDomain.baseUrl() does not return FIPS-compliant url for gov cloud regions ([#20200](https://github.com/aws/aws-cdk/issues/20200)) ([dd10df1](https://github.com/aws/aws-cdk/commit/dd10df1c84eaa752e3587a6b1f0c7e28b9d508e3)), closes [#20182](https://github.com/aws/aws-cdk/issues/20182) [#12500](https://github.com/aws/aws-cdk/issues/12500)
* **stepfunctions:** map property maxConcurrency is not token-aware ([#20279](https://github.com/aws/aws-cdk/issues/20279)) ([14be764](https://github.com/aws/aws-cdk/commit/14be76497b85f6cd9083620ebe5d890359540aa5)), closes [#20152](https://github.com/aws/aws-cdk/issues/20152)

## [1.155.0](https://github.com/aws/aws-cdk/compare/v1.154.0...v1.155.0) (2022-05-04)


Expand Down
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ sufficient to get clarity on what you plan to do. If the changes are
significant or intrusive to the existing CDK experience, and especially for a
brand new L2 construct implementation, please write an RFC in our [RFC
repository](https://github.com/aws/aws-cdk-rfcs) before jumping into the code
base.
base. L2 construct implementation pull requests will not be reviewed without
linking an approved RFC.

### Step 3: Work your Magic

Expand Down Expand Up @@ -325,12 +326,17 @@ $ yarn watch & # runs in the background
[conventionalcommits](https://www.conventionalcommits.org).
* The title must begin with `feat(module): title`, `fix(module): title`, `refactor(module): title` or
`chore(module): title`.
* Titles for `feat` and `fix` PRs end up in the change log. Think about what makes most sense for users reading the changelog while writing them.
* `feat`: describe the feature (not the action of creating the commit or PR, for example, avoid words like "added" or "changed")
* `fix`: describe the bug (not the solution)
* Title should be lowercase.
* No period at the end of the title.

* Pull request message should describe _motivation_. Think about your code reviewers and what information they need in
* Pull request body should describe _motivation_. Think about your code reviewers and what information they need in
order to understand what you did. If it's a big commit (hopefully not), try to provide some good entry points so
it will be easier to follow.
* For bugs, describe bug, root cause, solution, potential alternatives considered but discarded.
* For features, describe use case, most salient design aspects (especially if new), potential alternatives.

* Pull request message should indicate which issues are fixed: `fixes #<issue>` or `closes #<issue>`.

Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"postinstall": "patch-package --error-on-fail"
},
"devDependencies": {
"@types/prettier": "2.6.0",
"@yarnpkg/lockfile": "^1.1.0",
"cdk-generate-synthetic-examples": "^0.1.10",
"conventional-changelog-cli": "^2.2.2",
Expand Down Expand Up @@ -79,12 +80,8 @@
"@aws-cdk/assertions-alpha/fs-extra/**",
"@aws-cdk/assertions/fs-extra",
"@aws-cdk/assertions/fs-extra/**",
"@aws-cdk/aws-amplify-alpha/yaml",
"@aws-cdk/aws-amplify-alpha/yaml/**",
"@aws-cdk/aws-iot-actions-alpha/case",
"@aws-cdk/aws-iot-actions-alpha/case/**",
"@aws-cdk/aws-amplify/yaml",
"@aws-cdk/aws-amplify/yaml/**",
"@aws-cdk/aws-codebuild/yaml",
"@aws-cdk/aws-codebuild/yaml/**",
"@aws-cdk/aws-codepipeline-actions/case",
Expand Down
9 changes: 8 additions & 1 deletion packages/@aws-cdk/alexa-ask/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/
- Use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, in the same way you would use [the CloudFormation Alexa::ASK resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Alexa_ASK.html) directly.


(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.)
<!--BEGIN CFNONLY DISCLAIMER-->

There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet.
However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly.

For more information on the resources and properties available for this service, see the [CloudFormation documentation for Alexa::ASK](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Alexa_ASK.html).

(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) and submit an RFC if you are interested in contributing to this construct library.)

<!--END CFNONLY DISCLAIMER-->
2 changes: 2 additions & 0 deletions packages/@aws-cdk/assertions/lib/helpers-internal/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from '../match';
export * from '../matcher';
5 changes: 5 additions & 0 deletions packages/@aws-cdk/assertions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"build+extract": "yarn build && yarn rosetta:extract",
"build+test+extract": "yarn build+test && yarn rosetta:extract"
},
"ubergen": {
"exports": {
"./lib/helpers-internal": "./lib/helpers-internal/index.js"
}
},
"jsii": {
"outdir": "dist",
"diagnostics": {
Expand Down
9 changes: 8 additions & 1 deletion packages/@aws-cdk/aws-accessanalyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/
- Use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, in the same way you would use [the CloudFormation AWS::AccessAnalyzer resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_AccessAnalyzer.html) directly.


(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.)
<!--BEGIN CFNONLY DISCLAIMER-->

There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet.
However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly.

For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::AccessAnalyzer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_AccessAnalyzer.html).

(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) and submit an RFC if you are interested in contributing to this construct library.)

<!--END CFNONLY DISCLAIMER-->
9 changes: 8 additions & 1 deletion packages/@aws-cdk/aws-amazonmq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/
- Use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, in the same way you would use [the CloudFormation AWS::AmazonMQ resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_AmazonMQ.html) directly.


(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.)
<!--BEGIN CFNONLY DISCLAIMER-->

There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet.
However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly.

For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::AmazonMQ](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_AmazonMQ.html).

(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) and submit an RFC if you are interested in contributing to this construct library.)

<!--END CFNONLY DISCLAIMER-->
21 changes: 0 additions & 21 deletions packages/@aws-cdk/aws-amplify/NOTICE
Original file line number Diff line number Diff line change
@@ -1,23 +1,2 @@
AWS Cloud Development Kit (AWS CDK)
Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.

-------------------------------------------------------------------------------

The AWS CDK includes the following third-party software/licensing:

** yaml - https://www.npmjs.com/package/yaml
Copyright 2018 Eemeli Aro <eemeli@gmail.com>

Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.

----------------
20 changes: 13 additions & 7 deletions packages/@aws-cdk/aws-amplify/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as codebuild from '@aws-cdk/aws-codebuild';
import * as iam from '@aws-cdk/aws-iam';
import { IResource, Lazy, Resource, SecretValue } from '@aws-cdk/core';
import { Construct } from 'constructs';
import * as YAML from 'yaml';
import { CfnApp } from './amplify.generated';
import { BasicAuth } from './basic-auth';
import { Branch, BranchOptions } from './branch';
Expand Down Expand Up @@ -515,11 +514,18 @@ export interface CustomResponseHeader {
}

function renderCustomResponseHeaders(customHeaders: CustomResponseHeader[]): string {
const modifiedHeaders = customHeaders.map(customHeader => ({
...customHeader,
headers: Object.entries(customHeader.headers).map(([key, value]) => ({ key, value })),
}));
const yaml = [
'customHeaders:',
];

for (const customHeader of customHeaders) {
yaml.push(` - pattern: "${customHeader.pattern}"`);
yaml.push(' headers:');
for (const [key, value] of Object.entries(customHeader.headers)) {
yaml.push(` - key: "${key}"`);
yaml.push(` value: "${value}"`);
}
}

const customHeadersObject = { customHeaders: modifiedHeaders };
return YAML.stringify(customHeadersObject);
return `${yaml.join('\n')}\n`;
}
7 changes: 1 addition & 6 deletions packages/@aws-cdk/aws-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.0",
"@types/yaml": "1.9.6",
"aws-sdk": "^2.848.0"
},
"dependencies": {
Expand All @@ -101,12 +100,8 @@
"@aws-cdk/aws-secretsmanager": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/custom-resources": "0.0.0",
"constructs": "^3.3.69",
"yaml": "1.10.2"
"constructs": "^3.3.69"
},
"bundledDependencies": [
"yaml"
],
"peerDependencies": {
"@aws-cdk/aws-codebuild": "0.0.0",
"@aws-cdk/aws-codecommit": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,18 @@
},
"Username": "aws"
},
"CustomHeaders": "customHeaders:\n - pattern: \"*.json\"\n headers:\n - key: custom-header-name-1\n value: custom-header-value-1\n - key: custom-header-name-2\n value: custom-header-value-2\n - pattern: /path/*\n headers:\n - key: custom-header-name-1\n value: custom-header-value-2\n",
"CustomHeaders": {
"Fn::Join": [
"",
[
"customHeaders:\n - pattern: \"*.json\"\n headers:\n - key: \"custom-header-name-1\"\n value: \"custom-header-value-1\"\n - key: \"custom-header-name-2\"\n value: \"custom-header-value-2\"\n - pattern: \"/path/*\"\n headers:\n - key: \"custom-header-name-1\"\n value: \"custom-header-value-2\"\n - key: \"x-aws-url-suffix\"\n value: \"this-is-the-suffix-",
{
"Ref": "AWS::URLSuffix"
},
"\"\n"
]
]
},
"CustomRules": [
{
"Source": "/source",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"17.0.0"}
{"version":"19.0.0"}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "18.0.0",
"version": "19.0.0",
"testCases": {
"aws-amplify/test/integ.app": {
"integ.app": {
"stacks": [
"cdk-amplify-app"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "17.0.0",
"version": "19.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
Expand Down
13 changes: 12 additions & 1 deletion packages/@aws-cdk/aws-amplify/test/app.integ.snapshot/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,18 @@
]
}
},
"customHeaders": "customHeaders:\n - pattern: \"*.json\"\n headers:\n - key: custom-header-name-1\n value: custom-header-value-1\n - key: custom-header-name-2\n value: custom-header-value-2\n - pattern: /path/*\n headers:\n - key: custom-header-name-1\n value: custom-header-value-2\n",
"customHeaders": {
"Fn::Join": [
"",
[
"customHeaders:\n - pattern: \"*.json\"\n headers:\n - key: \"custom-header-name-1\"\n value: \"custom-header-value-1\"\n - key: \"custom-header-name-2\"\n value: \"custom-header-value-2\"\n - pattern: \"/path/*\"\n headers:\n - key: \"custom-header-name-1\"\n value: \"custom-header-value-2\"\n - key: \"x-aws-url-suffix\"\n value: \"this-is-the-suffix-",
{
"Ref": "AWS::URLSuffix"
},
"\"\n"
]
]
},
"customRules": [
{
"source": "/source",
Expand Down
19 changes: 18 additions & 1 deletion packages/@aws-cdk/aws-amplify/test/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,28 @@ test('with custom headers', () => {
'custom-header-name-1': 'custom-header-value-2',
},
},
{
pattern: '/with-tokens/*',
headers: {
'x-custom': `${'hello'.repeat(10)}${Stack.of(stack).urlSuffix} `,
},
},
],
});

// THEN
Template.fromStack(stack).hasResourceProperties('AWS::Amplify::App', {
CustomHeaders: 'customHeaders:\n - pattern: "*.json"\n headers:\n - key: custom-header-name-1\n value: custom-header-value-1\n - key: custom-header-name-2\n value: custom-header-value-2\n - pattern: /path/*\n headers:\n - key: custom-header-name-1\n value: custom-header-value-2\n',
CustomHeaders: {
'Fn::Join': [
'',
[
'customHeaders:\n - pattern: "*.json"\n headers:\n - key: "custom-header-name-1"\n value: "custom-header-value-1"\n - key: "custom-header-name-2"\n value: "custom-header-value-2"\n - pattern: "/path/*"\n headers:\n - key: "custom-header-name-1"\n value: "custom-header-value-2"\n - pattern: "/with-tokens/*"\n headers:\n - key: "x-custom"\n value: "hellohellohellohellohellohellohellohellohellohello',
{
Ref: 'AWS::URLSuffix',
},
' "\n',
],
],
},
});
});
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-amplify/test/integ.app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class TestStack extends Stack {
pattern: '/path/*',
headers: {
'custom-header-name-1': 'custom-header-value-2',
'x-aws-url-suffix': `this-is-the-suffix-${Stack.of(this).urlSuffix}`,
},
},
],
Expand Down
9 changes: 8 additions & 1 deletion packages/@aws-cdk/aws-amplifyuibuilder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/
- Use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, in the same way you would use [the CloudFormation AWS::AmplifyUIBuilder resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_AmplifyUIBuilder.html) directly.


(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) if you are interested in contributing to this construct library.)
<!--BEGIN CFNONLY DISCLAIMER-->

There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet.
However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly.

For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::AmplifyUIBuilder](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_AmplifyUIBuilder.html).

(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) and submit an RFC if you are interested in contributing to this construct library.)

<!--END CFNONLY DISCLAIMER-->
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-apigateway/lib/restapi.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as cloudwatch from '@aws-cdk/aws-cloudwatch';
import { IVpcEndpoint } from '@aws-cdk/aws-ec2';
import * as iam from '@aws-cdk/aws-iam';
import { ArnFormat, CfnOutput, IResource as IResourceBase, Resource, Stack } from '@aws-cdk/core';
import { ArnFormat, CfnOutput, IResource as IResourceBase, Resource, Stack, Token } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { ApiDefinition } from './api-definition';
import { ApiKey, ApiKeyOptions, IApiKey } from './api-key';
Expand Down Expand Up @@ -368,7 +368,7 @@ export abstract class RestApiBase extends Resource implements IRestApi {
}

public arnForExecuteApi(method: string = '*', path: string = '/*', stage: string = '*') {
if (!path.startsWith('/')) {
if (!Token.isUnresolved(path) && !path.startsWith('/')) {
throw new Error(`"path" must begin with a "/": '${path}'`);
}

Expand Down
Loading

0 comments on commit 23fa8f8

Please sign in to comment.