Skip to content

Commit ae1cb4b

Browse files
authored
2 parents 585f9ca + 2697366 commit ae1cb4b

File tree

555 files changed

+14324
-1478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

555 files changed

+14324
-1478
lines changed

.github/ISSUE_TEMPLATE/documentation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "📕 Documentation Issue"
33
description: Report an issue in the API Reference documentation or Developer Guide
4-
title: "(short issue description)"
4+
title: "(module name): (short issue description)"
55
labels: [documentation, needs-triage]
66
assignees: []
77
body:

.github/ISSUE_TEMPLATE/feature-request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: 🚀 Feature Request
33
description: Suggest an idea for this project
4-
title: "(short issue description)"
4+
title: "(module name): (short issue description)"
55
labels: [feature-request, needs-triage]
66
assignees: []
77
body:

.github/workflows/issue-label-assign.yml

+68-68
Large diffs are not rendered by default.

.github/workflows/issue-reprioritization.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ jobs:
77
issue-reprioritization:
88
permissions:
99
issues: write
10+
repository-projects: write
1011
runs-on: ubuntu-latest
1112
steps:
1213
- uses: kaizencc/issue-reprioritization-manager@main
@@ -16,6 +17,7 @@ jobs:
1617
original-label: p2
1718
new-label: p1
1819
reprioritization-threshold: 20
20+
project-column-url: https://github.com/aws/aws-cdk/projects/13#column-18002436
1921
- uses: kaizencc/pr-triage-manager@main
2022
with:
2123
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/team-owners-assignment.yml

-15
This file was deleted.

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
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.
44

5+
## [1.156.1](https://github.com/aws/aws-cdk/compare/v1.156.0...v1.156.1) (2022-05-12)
6+
7+
## [1.156.0](https://github.com/aws/aws-cdk/compare/v1.155.0...v1.156.0) (2022-05-11)
8+
9+
10+
### Features
11+
12+
* **lambda:** nodejs16.x runtime ([#20261](https://github.com/aws/aws-cdk/issues/20261)) ([edf7c86](https://github.com/aws/aws-cdk/commit/edf7c864f90acc4f29ff78ff0de74e324f8b85ee))
13+
14+
15+
### Bug Fixes
16+
17+
* **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)
18+
* **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)
19+
* **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)
20+
521
## [1.155.0](https://github.com/aws/aws-cdk/compare/v1.154.0...v1.155.0) (2022-05-04)
622

723

CHANGELOG.v2.alpha.md

+13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
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.
44

5+
## [2.25.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.24.1-alpha.0...v2.25.0-alpha.0) (2022-05-20)
6+
7+
8+
### Features
9+
10+
* **cloud9:** configure Connection Type of Ec2Environment ([#20250](https://github.com/aws/aws-cdk/issues/20250)) ([01708bc](https://github.com/aws/aws-cdk/commit/01708bc7cf842eab7e1d1fc58bf42e4724624c0a)), closes [#17027](https://github.com/aws/aws-cdk/issues/17027)
11+
* **integ-tests:** enhancements to integ-tests ([#20180](https://github.com/aws/aws-cdk/issues/20180)) ([3ff3fb7](https://github.com/aws/aws-cdk/commit/3ff3fb7c5ec9636022b3046036376c09a3166fb0))
12+
13+
14+
### Bug Fixes
15+
16+
* **amplify:** custom headers break with tokens ([#20395](https://github.com/aws/aws-cdk/issues/20395)) ([765f441](https://github.com/aws/aws-cdk/commit/765f44177298b645c88a29587b52619e91a8757c))
17+
518
## [2.24.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.24.0-alpha.0...v2.24.1-alpha.0) (2022-05-12)
619

720
## [2.24.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.23.0-alpha.0...v2.24.0-alpha.0) (2022-05-11)

CHANGELOG.v2.md

+30
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,36 @@
22

33
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.
44

5+
## [2.25.0](https://github.com/aws/aws-cdk/compare/v2.24.1...v2.25.0) (2022-05-20)
6+
7+
8+
### Features
9+
10+
* **cfnspec:** cloudformation spec v69.0.0 ([#20240](https://github.com/aws/aws-cdk/issues/20240)) ([e82b63f](https://github.com/aws/aws-cdk/commit/e82b63fc8880ecbd5e29d02e3e623cda3bbce1d6)) and ([#20331](https://github.com/aws/aws-cdk/issues/20331)) ([e9de4e9](https://github.com/aws/aws-cdk/commit/e9de4e9ab6bc44ff691238d91a8945c880a4d97c))
11+
* **cfnspec:** cloudformation spec v72.0.0 ([#20357](https://github.com/aws/aws-cdk/issues/20357)) ([c8fd84c](https://github.com/aws/aws-cdk/commit/c8fd84c12c726e216c10380f9fe7e5d55a892cdf))
12+
* **cli:** make ecr images immutable when created from cdk bootstrap ([#19937](https://github.com/aws/aws-cdk/issues/19937)) ([0ef4bb4](https://github.com/aws/aws-cdk/commit/0ef4bb4bf493a7e3b72b518841f676e91d014ba9)), closes [#18376](https://github.com/aws/aws-cdk/issues/18376)
13+
* **cloudfront:** REST API origin ([#20335](https://github.com/aws/aws-cdk/issues/20335)) ([f7693e3](https://github.com/aws/aws-cdk/commit/f7693e3f981f60886c94fb61876a1e5e0f2c1a02))
14+
* **cognito:** `grant()` for user pool ([#20285](https://github.com/aws/aws-cdk/issues/20285)) ([10d13e4](https://github.com/aws/aws-cdk/commit/10d13e4bc1841721650f9ca9b6b16e18c219ea21))
15+
* **core:** allow disabling of LogicalID Metadata in case of large manifest ([#20433](https://github.com/aws/aws-cdk/pull/20433)) ([88ea829](https://github.com/aws/aws-cdk/commit/88ea829b5d0a64f51848474b6b9f006d1f729fb4)), closes [#20211](https://github.com/aws/aws-cdk/issues/20211)
16+
* **ec2:** more router types ([#20151](https://github.com/aws/aws-cdk/issues/20151)) ([33b983c](https://github.com/aws/aws-cdk/commit/33b983ca76c91f182e60dcab8c6ead6be4d4712d)), closes [#19057](https://github.com/aws/aws-cdk/issues/19057) [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html#aws-resource-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html/issues/aws-resource-ec2)
17+
* **iam:** validate role path at build time ([#16165](https://github.com/aws/aws-cdk/issues/16165)) ([65a5a46](https://github.com/aws/aws-cdk/commit/65a5a46837c42b2538837a699267ec9cc46ddc51)), closes [#13747](https://github.com/aws/aws-cdk/issues/13747)
18+
* **logs:** additional log retention periods ([#20347](https://github.com/aws/aws-cdk/issues/20347)) ([734faa5](https://github.com/aws/aws-cdk/commit/734faa5ae7489a511d5a00f255d7afd408db880c)), closes [#20346](https://github.com/aws/aws-cdk/issues/20346)
19+
* **s3:** add `noncurrentVersionsToRetain` property to lifecycle rule ([#20348](https://github.com/aws/aws-cdk/issues/20348)) ([85604d9](https://github.com/aws/aws-cdk/commit/85604d929978aa1c645dba8959d682892278f862)), closes [#19784](https://github.com/aws/aws-cdk/issues/19784)
20+
21+
22+
### Bug Fixes
23+
24+
* **apigateway:** arnForExecuteApi fails on tokenized path ([#20323](https://github.com/aws/aws-cdk/issues/20323)) ([f7732a1](https://github.com/aws/aws-cdk/commit/f7732a1b06927d84e79ea1c9fb671ad184a9efea)), closes [#20252](https://github.com/aws/aws-cdk/issues/20252)
25+
* **assets:** parallel docker image publishing fails on macOS ([#20117](https://github.com/aws/aws-cdk/issues/20117)) ([a58a803](https://github.com/aws/aws-cdk/commit/a58a8037b79636e9f973beff2483baecad73f15d)), closes [#20116](https://github.com/aws/aws-cdk/issues/20116)
26+
* **cfn-include:** allow CFN Functions in Tags ([#19923](https://github.com/aws/aws-cdk/issues/19923)) ([4df9a4f](https://github.com/aws/aws-cdk/commit/4df9a4fa9ef24266b2bcde378ecc112c7dcaf8aa)), closes [#16889](https://github.com/aws/aws-cdk/issues/16889)
27+
* **cli:** allow SSO profiles to be used as source profiles ([#20340](https://github.com/aws/aws-cdk/issues/20340)) ([a0b29e9](https://github.com/aws/aws-cdk/commit/a0b29e9f29775bfd94307a8975f5ba3a8faf05fa)), closes [#19897](https://github.com/aws/aws-cdk/issues/19897)
28+
* **cloudwatch-actions:** stack partition is hardcoded 'aws' in action arn ([#20224](https://github.com/aws/aws-cdk/issues/20224)) ([0eb6c3b](https://github.com/aws/aws-cdk/commit/0eb6c3bb5853194f8727fc2cd3b1c9acb6eea20f)), closes [#19765](https://github.com/aws/aws-cdk/issues/19765)
29+
* **eks:** Cluster.FromClusterAttributes ignores KubectlLambdaRole ([#20373](https://github.com/aws/aws-cdk/issues/20373)) ([7e824ab](https://github.com/aws/aws-cdk/commit/7e824ab40772dc888aec7986e343b12ec1032657)), closes [#20008](https://github.com/aws/aws-cdk/issues/20008)
30+
* **iam:** AccountPrincipal accepts values which aren't account IDs ([#20292](https://github.com/aws/aws-cdk/issues/20292)) ([d0163f8](https://github.com/aws/aws-cdk/commit/d0163f8a3d14e38f67b381c569b5bd3af92c4f51)), closes [#20288](https://github.com/aws/aws-cdk/issues/20288)
31+
* **pipelines:** specifying the Action Role for CodeBuild steps ([#18293](https://github.com/aws/aws-cdk/issues/18293)) ([719edfc](https://github.com/aws/aws-cdk/commit/719edfcb949828a423be2367b5c85b0e9a9c1c12)), closes [#18291](https://github.com/aws/aws-cdk/issues/18291) [#18291](https://github.com/aws/aws-cdk/issues/18291)
32+
* **rds:** tokens should not be lowercased ([#20287](https://github.com/aws/aws-cdk/issues/20287)) ([5429e55](https://github.com/aws/aws-cdk/commit/5429e55126db7556dd2eb2d5e30a50976b5f6ee4)), closes [#18802](https://github.com/aws/aws-cdk/issues/18802)
33+
* **secretsmanager:** automatic rotation cannot be disabled ([#18906](https://github.com/aws/aws-cdk/issues/18906)) ([c50d60c](https://github.com/aws/aws-cdk/commit/c50d60ca9417c771ca31cb330521e0e9f988e3fd)), closes [#18749](https://github.com/aws/aws-cdk/issues/18749)
34+
535
## [2.24.1](https://github.com/aws/aws-cdk/compare/v2.24.0...v2.24.1) (2022-05-12)
636

737
## [2.24.0](https://github.com/aws/aws-cdk/compare/v2.23.0...v2.24.0) (2022-05-11)

CONTRIBUTING.md

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

233234
### Step 3: Work your Magic
234235

@@ -325,12 +326,17 @@ $ yarn watch & # runs in the background
325326
[conventionalcommits](https://www.conventionalcommits.org).
326327
* The title must begin with `feat(module): title`, `fix(module): title`, `refactor(module): title` or
327328
`chore(module): title`.
329+
* 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.
330+
* `feat`: describe the feature (not the action of creating the commit or PR, for example, avoid words like "added" or "changed")
331+
* `fix`: describe the bug (not the solution)
328332
* Title should be lowercase.
329333
* No period at the end of the title.
330334

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

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

package.json

-4
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,8 @@
8181
"@aws-cdk/assertions-alpha/fs-extra/**",
8282
"@aws-cdk/assertions/fs-extra",
8383
"@aws-cdk/assertions/fs-extra/**",
84-
"@aws-cdk/aws-amplify-alpha/yaml",
85-
"@aws-cdk/aws-amplify-alpha/yaml/**",
8684
"@aws-cdk/aws-iot-actions-alpha/case",
8785
"@aws-cdk/aws-iot-actions-alpha/case/**",
88-
"@aws-cdk/aws-amplify/yaml",
89-
"@aws-cdk/aws-amplify/yaml/**",
9086
"@aws-cdk/aws-codebuild/yaml",
9187
"@aws-cdk/aws-codebuild/yaml/**",
9288
"@aws-cdk/aws-codepipeline-actions/case",

packages/@aws-cdk/alexa-ask/README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/
2727
- 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.
2828

2929

30-
(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.)
30+
<!--BEGIN CFNONLY DISCLAIMER-->
31+
32+
There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet.
33+
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.
34+
35+
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).
36+
37+
(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.)
3138

3239
<!--END CFNONLY DISCLAIMER-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from '../match';
2+
export * from '../matcher';

packages/@aws-cdk/assertions/package.json

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
"build+extract": "yarn build && yarn rosetta:extract",
1919
"build+test+extract": "yarn build+test && yarn rosetta:extract"
2020
},
21+
"ubergen": {
22+
"exports": {
23+
"./lib/helpers-internal": "./lib/helpers-internal/index.js"
24+
}
25+
},
2126
"jsii": {
2227
"outdir": "dist",
2328
"diagnostics": {

packages/@aws-cdk/aws-accessanalyzer/README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/
2727
- 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.
2828

2929

30-
(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.)
30+
<!--BEGIN CFNONLY DISCLAIMER-->
31+
32+
There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet.
33+
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.
34+
35+
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).
36+
37+
(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.)
3138

3239
<!--END CFNONLY DISCLAIMER-->

packages/@aws-cdk/aws-amazonmq/README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/
2727
- 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.
2828

2929

30-
(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.)
30+
<!--BEGIN CFNONLY DISCLAIMER-->
31+
32+
There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet.
33+
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.
34+
35+
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).
36+
37+
(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.)
3138

3239
<!--END CFNONLY DISCLAIMER-->

packages/@aws-cdk/aws-amplify/NOTICE

-21
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,2 @@
11
AWS Cloud Development Kit (AWS CDK)
22
Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
4-
-------------------------------------------------------------------------------
5-
6-
The AWS CDK includes the following third-party software/licensing:
7-
8-
** yaml - https://www.npmjs.com/package/yaml
9-
Copyright 2018 Eemeli Aro <[email protected]>
10-
11-
Permission to use, copy, modify, and/or distribute this software for any purpose
12-
with or without fee is hereby granted, provided that the above copyright notice
13-
and this permission notice appear in all copies.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
16-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17-
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
18-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
19-
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
20-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
21-
THIS SOFTWARE.
22-
23-
----------------

packages/@aws-cdk/aws-amplify/lib/app.ts

+13-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as codebuild from '@aws-cdk/aws-codebuild';
22
import * as iam from '@aws-cdk/aws-iam';
33
import { IResource, Lazy, Resource, SecretValue } from '@aws-cdk/core';
44
import { Construct } from 'constructs';
5-
import * as YAML from 'yaml';
65
import { CfnApp } from './amplify.generated';
76
import { BasicAuth } from './basic-auth';
87
import { Branch, BranchOptions } from './branch';
@@ -515,11 +514,18 @@ export interface CustomResponseHeader {
515514
}
516515

517516
function renderCustomResponseHeaders(customHeaders: CustomResponseHeader[]): string {
518-
const modifiedHeaders = customHeaders.map(customHeader => ({
519-
...customHeader,
520-
headers: Object.entries(customHeader.headers).map(([key, value]) => ({ key, value })),
521-
}));
517+
const yaml = [
518+
'customHeaders:',
519+
];
520+
521+
for (const customHeader of customHeaders) {
522+
yaml.push(` - pattern: "${customHeader.pattern}"`);
523+
yaml.push(' headers:');
524+
for (const [key, value] of Object.entries(customHeader.headers)) {
525+
yaml.push(` - key: "${key}"`);
526+
yaml.push(` value: "${value}"`);
527+
}
528+
}
522529

523-
const customHeadersObject = { customHeaders: modifiedHeaders };
524-
return YAML.stringify(customHeadersObject);
530+
return `${yaml.join('\n')}\n`;
525531
}

packages/@aws-cdk/aws-amplify/package.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
"@aws-cdk/cfn2ts": "0.0.0",
8989
"@aws-cdk/pkglint": "0.0.0",
9090
"@types/jest": "^27.5.0",
91-
"@types/yaml": "1.9.6",
9291
"aws-sdk": "^2.848.0"
9392
},
9493
"dependencies": {
@@ -102,12 +101,8 @@
102101
"@aws-cdk/aws-secretsmanager": "0.0.0",
103102
"@aws-cdk/core": "0.0.0",
104103
"@aws-cdk/custom-resources": "0.0.0",
105-
"constructs": "^10.0.0",
106-
"yaml": "1.10.2"
104+
"constructs": "^10.0.0"
107105
},
108-
"bundledDependencies": [
109-
"yaml"
110-
],
111106
"peerDependencies": {
112107
"@aws-cdk/aws-codebuild": "0.0.0",
113108
"@aws-cdk/aws-codecommit": "0.0.0",

0 commit comments

Comments
 (0)