Skip to content

Commit 22461ea

Browse files
authored
Merge branch 'main' into corymhall/core/fix-export-writer-multi-region
2 parents 8f1a86f + a0ad49d commit 22461ea

637 files changed

Lines changed: 14504 additions & 2809 deletions

File tree

Some content is hidden

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

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jsii/superchain:1-buster-slim
1+
FROM jsii/superchain:1-buster-slim-node18
22

33
USER root
44

CONTRIBUTING.md

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ let us know if it's not up-to-date (even better, submit a PR with your correcti
5151

5252
The following steps describe how to set up the AWS CDK repository on your local machine.
5353
The alternative is to use [Gitpod](https://www.gitpod.io/), a Cloud IDE for your development.
54-
See [Gitpod section](#gitpod-alternative) on how to set up the CDK repo on Gitpod.
54+
See [Gitpod section](#gitpod) on how to set up the CDK repo on Gitpod.
5555

5656
### Setup
5757

@@ -92,7 +92,7 @@ CDK can be found at the location `packages/aws-cdk-lib/aws-iam`.
9292
The repo also contains the `tools/` directory that holds custom build tooling (modeled as private npm packages)
9393
specific to the CDK.
9494

95-
### Build
95+
### Building aws-cdk-lib
9696

9797
The full build of all of the packages within the repository can take a few minutes, about 20 when all tests are run.
9898
Most contributions only require working on a single package, usually `aws-cdk-lib`. To build this package for the first
@@ -162,7 +162,7 @@ Please follow the [setup instructions](https://code.visualstudio.com/docs/remote
162162

163163
With VS Code setup, you will be prompted to open the `aws-cdk` repo in a Dev Container, or you can choos "Dev Containers: Reopen in Container" from the VS Code command palette.
164164

165-
### Gitpod (Alternative)
165+
### Gitpod
166166

167167
You may also set up your local development environment using [Gitpod](http://gitpod.io) -
168168
a service that allows you to spin up an in-browser Visual Studio Code-compatible editor,
@@ -177,7 +177,22 @@ You can now work on your CDK repository, as described in the [Getting Started](#
177177
Gitpod is free for 50 hours per month - make sure to stop your workspace when you're done
178178
(you can always resume it later, and it won't need to run the build again).
179179

180-
For Gitpod users only! The best way to supply CDK with your AWS credentials is to add them as
180+
For Gitpod users only! The best way to authenticate AWS in Gitpod is to use AWS IAM Identity Center(successor to AWS Single Sign-On). [Install AWS CLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#getting-started-install-instructions) and configure it as follows:
181+
182+
```shell
183+
# make sure AWS CLI v2 is in your $PATH
184+
$ aws --version
185+
# configure the AWS profile with SSO
186+
$ aws configure sso
187+
# login and authenticate
188+
$ aws sso login
189+
# verify your current identity
190+
$ aws sts get-caller-identity
191+
```
192+
193+
Check out [this document](https://docs.aws.amazon.com/cli/latest/userguide/sso-configure-profile-token.html) for the details.
194+
195+
Alternatively, supply CDK with your AWS credentials as
181196
[persisting environment variables](https://www.gitpod.io/docs/environment-variables).
182197
Adding them works as follows via terminal:
183198

@@ -188,6 +203,26 @@ eval $(gp env -e AWS_DEFAULT_REGION=ZZZZZZZZ)
188203
eval $(gp env -e)
189204
```
190205

206+
### Amazon CodeCatalyst Dev Environments
207+
208+
Dev Environments are cloud-based development environments.
209+
[Amazon CodeCatalyst](https://aws.amazon.com/codecatalyst/) allows you to checkout your linked Github
210+
repositories in your Dev Environments with your favorite local IDEs such as VSCode or JetBrains.
211+
212+
Build up `aws-cdk-lib` as well as `framework-integ` when you enter your Dev Env:
213+
214+
```shell
215+
$ yarn install
216+
$ NODE_OPTIONS=--max-old-space-size=8192 npx lerna run build --scope=aws-cdk-lib --scope=@aws-cdk-testing/framework-integ
217+
```
218+
219+
You may [configure your Dev Env](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment-devfile.html) with the `devfile.yaml` to further customize your Dev Env for CDK development.
220+
221+
Read the links below for more details:
222+
- [Dev Environments in CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment.html)
223+
- [Using GitHub repositories in CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/extensions-github.html)
224+
- [Setting up to use the AWS CLI with CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/set-up-cli.html)
225+
191226
## Pull Requests
192227

193228
Below is a flow chart that describes how your PR may be treated by repository maintainers:
@@ -279,6 +314,14 @@ Integration tests perform a few functions in the CDK code base -
279314
3. (Optionally) Acts as a way to validate that constructs set up the CloudFormation resources as expected. A successful
280315
CloudFormation deployment does not mean that the resources are set up correctly.
281316

317+
**Build framework-integ**
318+
319+
You need to build the `framework-integ` before running the `yarn integ`
320+
321+
```console
322+
$ npx lerna run build --scope=@aws-cdk-testing/framework-integ
323+
```
324+
282325
**When are integration tests required?**
283326

284327
The following list contains common scenarios where we _know_ that integration tests are required.
@@ -308,7 +351,7 @@ Examples:
308351
* [integ.destinations.ts](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-destinations/test/integ.destinations.ts#L7)
309352
* [integ.put-events.ts](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-stepfunctions-tasks/test/eventbridge/integ.put-events.ts)
310353

311-
**What do do if you cannot run integration tests**
354+
**What if you cannot run integration tests**
312355

313356
If you are working on a PR that requires an update to an integration test and you are unable
314357
to run the `cdk-integ` tool to perform a real deployment, please call this out on the pull request
@@ -429,7 +472,7 @@ $ yarn integ --directory test/aws-eks/test
429472
Or run a specific integ test:
430473

431474
```console
432-
$ yarn integ --directory test/aws-eks/test/integ.name.js
475+
$ yarn integ test/aws-eks/test/integ.name.js
433476
```
434477

435478
See the [integration test guide](./INTEGRATION_TESTS.md) for a more complete guide on running

lerna.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"useWorkspaces": true,
44
"packages": [
55
"packages/aws-cdk-lib",
6-
"packages/cdk-cli-wrapper",
76
"packages/cdk-assets",
87
"packages/aws-cdk",
98
"packages/cdk",

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"build-all": "tsc -b"
1616
},
1717
"devDependencies": {
18+
"@nrwl/cli": "^15.9.1",
19+
"@nrwl/workspace": "^15.9.1",
1820
"@types/node": "18.11.19",
1921
"@types/prettier": "2.6.0",
2022
"@yarnpkg/lockfile": "^1.1.0",
@@ -28,12 +30,10 @@
2830
"jsii-reflect": "1.78.1",
2931
"jsii-rosetta": "~5.0.7",
3032
"lerna": "^6.6.1",
33+
"nx": "^15.9.1",
3134
"patch-package": "^6.5.1",
3235
"semver": "^6.3.0",
3336
"standard-version": "^9.5.0",
34-
"@nrwl/cli": "^15.9.1",
35-
"@nrwl/workspace": "^15.9.1",
36-
"nx": "^15.9.1",
3737
"typescript": "~4.9.5"
3838
},
3939
"resolutions": {
@@ -69,7 +69,6 @@
6969
"workspaces": {
7070
"packages": [
7171
"packages/aws-cdk-lib",
72-
"packages/cdk-cli-wrapper",
7372
"packages/aws-cdk",
7473
"packages/cdk",
7574
"packages/cdk-assets",

packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi.vpc-endpoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Test extends cdk.Stack {
1313
constructor(scope: cdk.App, id: string) {
1414
super(scope, id);
1515

16-
const vpc = new ec2.Vpc(this, 'MyVpc', {});
16+
const vpc = new ec2.Vpc(this, 'MyVpc', { restrictDefaultSecurityGroup: false });
1717

1818
const vpcEndpoint = vpc.addInterfaceEndpoint('MyVpcEndpoint', {
1919
service: ec2.InterfaceVpcEndpointAwsService.APIGATEWAY,

packages/@aws-cdk-testing/framework-integ/test/aws-appmesh/test/integ.mesh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const app = new cdk.App();
88
const stack = new cdk.Stack(app, 'mesh-stack', {});
99

1010
const vpc = new ec2.Vpc(stack, 'vpc', {
11+
restrictDefaultSecurityGroup: false,
1112
natGateways: 1,
1213
});
1314

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
schema {
2+
query: Query
3+
mutation: Mutation
4+
}
5+
6+
type Query {
7+
event(id:ID!): Event
8+
}
9+
10+
type Mutation {
11+
emitEvent(id: ID!, name: String): PutEventsResult!
12+
}
13+
14+
type Event {
15+
id: ID!
16+
name: String!
17+
}
18+
19+
type Entry {
20+
ErrorCode: String
21+
ErrorMessage: String
22+
EventId: String
23+
}
24+
25+
type PutEventsResult {
26+
Entries: [Entry!]
27+
FailedEntry: Int
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "31.0.0",
3+
"files": {
4+
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5+
"source": {
6+
"path": "apiDefaultTestDeployAssert018781F2.template.json",
7+
"packaging": "file"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
}
17+
},
18+
"dockerImages": {}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"Parameters": {
3+
"BootstrapVersion": {
4+
"Type": "AWS::SSM::Parameter::Value<String>",
5+
"Default": "/cdk-bootstrap/hnb659fds/version",
6+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
7+
}
8+
},
9+
"Rules": {
10+
"CheckBootstrapVersion": {
11+
"Assertions": [
12+
{
13+
"Assert": {
14+
"Fn::Not": [
15+
{
16+
"Fn::Contains": [
17+
[
18+
"1",
19+
"2",
20+
"3",
21+
"4",
22+
"5"
23+
],
24+
{
25+
"Ref": "BootstrapVersion"
26+
}
27+
]
28+
}
29+
]
30+
},
31+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
32+
}
33+
]
34+
}
35+
}
36+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"31.0.0"}

0 commit comments

Comments
 (0)