Skip to content

Commit fb67c77

Browse files
authored
2 parents e08e34a + cd306f7 commit fb67c77

File tree

304 files changed

+20569
-10624
lines changed

Some content is hidden

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

304 files changed

+20569
-10624
lines changed

.gitallowed

+4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ account: '012345678913'
1414

1515
# Account patterns used in the CHANGELOG
1616
account: '123456789012'
17+
18+
111111111111
19+
222222222222
1720
123456789012
21+
333333333333
1822

1923
# The account ID's of public facing ECR images for App Mesh Envoy
2024
# https://docs.aws.amazon.com/app-mesh/latest/userguide/envoy.html

.github/workflows/close-stale-prs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ on:
22
schedule:
33
# Cron format: min hr day month dow
44
- cron: "0 0 * * *"
5-
workflow_dispatch:
5+
workflow_dispatch:
66
jobs:
77
close-stale-prs:
88
permissions:
@@ -23,5 +23,5 @@ jobs:
2323
important-checks-regex: AutoBuildv2Project1C6BFA3F
2424
warn-message: This PR has been in the STATE state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.
2525
close-message: This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.
26-
skip-labels: contribution/core
26+
skip-labels: contribution/core, pr-linter/do-not-close
2727
close-label: closed-for-staleness

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.64.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.63.2-alpha.0...v2.64.0-alpha.0) (2023-02-09)
6+
7+
8+
### Features
9+
10+
* **cloud9:** support setting environment owner ([#23878](https://github.com/aws/aws-cdk/issues/23878)) ([08a2f36](https://github.com/aws/aws-cdk/commit/08a2f363093f39d04026778bb8d5d7f673698b57)), closes [#22474](https://github.com/aws/aws-cdk/issues/22474)
11+
* **redshift:** Tables can include comments ([#23847](https://github.com/aws/aws-cdk/issues/23847)) ([46cadd4](https://github.com/aws/aws-cdk/commit/46cadd4b2dd417e1484ba63389b33e1504cfd842)), closes [#22682](https://github.com/aws/aws-cdk/issues/22682)
12+
13+
14+
### Bug Fixes
15+
16+
* **servicecatalogappregistry:** default stack name is not meaningful and causes conflict when multiple stacks deployed to the same account-region ([#23823](https://github.com/aws/aws-cdk/issues/23823)) ([420b5ff](https://github.com/aws/aws-cdk/commit/420b5ff2bd08311f2c8cabbe0787c0e0bf4f8ae3))
17+
518
## [2.63.2-alpha.0](https://github.com/aws/aws-cdk/compare/v2.63.1-alpha.0...v2.63.2-alpha.0) (2023-02-04)
619

720
## [2.63.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.63.0-alpha.0...v2.63.1-alpha.0) (2023-02-03)

CHANGELOG.v2.md

+26
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
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.64.0](https://github.com/aws/aws-cdk/compare/v2.63.2...v2.64.0) (2023-02-09)
6+
7+
8+
### Features
9+
10+
* **cfnspec:** cloudformation spec v109.0.0 ([#23968](https://github.com/aws/aws-cdk/issues/23968)) ([5d59134](https://github.com/aws/aws-cdk/commit/5d5913455da2cdb834feef708fb01f9e77df656f))
11+
* **cfnspec:** cloudformation spec v109.0.0 ([#23984](https://github.com/aws/aws-cdk/issues/23984)) ([affe040](https://github.com/aws/aws-cdk/commit/affe040c8443be074822254d1e75a28b264cd801))
12+
* **cli:** --hotswap will not use CFN anymore, --hotswap-fallback to fall back if necessary ([#23653](https://github.com/aws/aws-cdk/issues/23653)) ([a5317ca](https://github.com/aws/aws-cdk/commit/a5317ca52f05ebc34d9f22196ab0ef36d5cac967)), closes [#22784](https://github.com/aws/aws-cdk/issues/22784) [#21773](https://github.com/aws/aws-cdk/issues/21773) [#21556](https://github.com/aws/aws-cdk/issues/21556) [#23640](https://github.com/aws/aws-cdk/issues/23640)
13+
* **elbv2:** add metrics to INetworkLoadBalancer and IApplicationLoadBalancer ([#23853](https://github.com/aws/aws-cdk/issues/23853)) ([cb889bc](https://github.com/aws/aws-cdk/commit/cb889bc2c267654ca97e3d85a16a99a667d3584c)), closes [#10850](https://github.com/aws/aws-cdk/issues/10850)
14+
* **iam:** implement IGrantable to Policy and ManagedPolicy ([#22712](https://github.com/aws/aws-cdk/issues/22712)) ([d3df40f](https://github.com/aws/aws-cdk/commit/d3df40ff89c70b9243ec175747eb398368067095)), closes [#10308](https://github.com/aws/aws-cdk/issues/10308)
15+
* **lambda:** enable RuntimeManagementConfig ([#23891](https://github.com/aws/aws-cdk/issues/23891)) ([be4f971](https://github.com/aws/aws-cdk/commit/be4f97129f4237b39d0b99977eb597e2af49ed2a)), closes [#23890](https://github.com/aws/aws-cdk/issues/23890)
16+
* **s3:** allow configuring S3 Object Lock ([#23744](https://github.com/aws/aws-cdk/issues/23744)) ([bdcd6c8](https://github.com/aws/aws-cdk/commit/bdcd6c890878fb71c480bf40964f1b6ea0a5f270)), closes [#5247](https://github.com/aws/aws-cdk/issues/5247) [#21738](https://github.com/aws/aws-cdk/issues/21738)
17+
18+
19+
### Bug Fixes
20+
21+
* Use the correct LB full name when creating metrics for imported LBs ([#23972](https://github.com/aws/aws-cdk/issues/23972)) ([16c23b7](https://github.com/aws/aws-cdk/commit/16c23b7554923bf6c2703ba5f229e6c34b459a2f)), closes [#23853](https://github.com/aws/aws-cdk/issues/23853)
22+
* **cdk-assets:** asset concurrency leaves a corrupted archive ([#24026](https://github.com/aws/aws-cdk/issues/24026)) ([989454f](https://github.com/aws/aws-cdk/commit/989454f7e27f3cbf33180d8aab29d56472378126))
23+
* **cdk-assets:** packaging assets is broken on Node older than 14.17 ([#23994](https://github.com/aws/aws-cdk/issues/23994)) ([5bde92c](https://github.com/aws/aws-cdk/commit/5bde92c2ae29781aafd8c3817d08e93748c39885)), closes [#23859](https://github.com/aws/aws-cdk/issues/23859)
24+
* **codedeploy:** cross-region referenced groups use wrong config ([#23986](https://github.com/aws/aws-cdk/issues/23986)) ([390ec78](https://github.com/aws/aws-cdk/commit/390ec78437a55ad68757f8ce812535e9bc149a2a))
25+
* **core:** cross-stack reference error doesn't include violation ([#23987](https://github.com/aws/aws-cdk/issues/23987)) ([c7ad66f](https://github.com/aws/aws-cdk/commit/c7ad66fad6ca5aff5f2ae9754d263dea9d1de368))
26+
* **ec2:** Cannot deploy VPC flow log with other resources that requires bucket policies ([#23889](https://github.com/aws/aws-cdk/issues/23889)) ([e646ad5](https://github.com/aws/aws-cdk/commit/e646ad5b5496b176549f8c039a5ffabbf07403ff)), closes [#18985](https://github.com/aws/aws-cdk/issues/18985)
27+
* **pipelines:** cannot configure actionName for all sources ([#24027](https://github.com/aws/aws-cdk/issues/24027)) ([9cd639b](https://github.com/aws/aws-cdk/commit/9cd639b0f83e65fbe531d56210f68e99874f506e))
28+
* **s3:** infer bucketWebsiteUrl and bucketDomainName suffixes from bucket region ([#23919](https://github.com/aws/aws-cdk/issues/23919)) ([252f052](https://github.com/aws/aws-cdk/commit/252f052d4239b320ac542c7db256683425ad7eba))
29+
* **s3-deployment:** wrong URL in BucketDeployment.deployedBucket.bucketWebsiteUrl ([#24055](https://github.com/aws/aws-cdk/issues/24055)) ([ece46db](https://github.com/aws/aws-cdk/commit/ece46dbd939383f240023172a491767b51eaa722)), closes [#23354](https://github.com/aws/aws-cdk/issues/23354)
30+
531
## [2.63.2](https://github.com/aws/aws-cdk/compare/v2.63.1...v2.63.2) (2023-02-04)
632

733
## [2.63.1](https://github.com/aws/aws-cdk/compare/v2.63.0...v2.63.1) (2023-02-03)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"devDependencies": {
1919
"@types/prettier": "2.6.0",
2020
"@yarnpkg/lockfile": "^1.1.0",
21-
"cdk-generate-synthetic-examples": "^0.1.138",
21+
"cdk-generate-synthetic-examples": "^0.1.140",
2222
"conventional-changelog-cli": "^2.2.2",
2323
"fs-extra": "^9.1.0",
2424
"graceful-fs": "^4.2.10",

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

+45-9
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@
2323

2424
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
2525

26-
AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a
27-
browser. It includes a code editor, debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular
28-
programming languages, including JavaScript, Python, PHP, and more, so you don’t need to install files or configure your
29-
development machine to start new projects. Since your Cloud9 IDE is cloud-based, you can work on your projects from your
30-
office, home, or anywhere using an internet-connected machine. Cloud9 also provides a seamless experience for developing
31-
serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of
32-
serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair
26+
AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a
27+
browser. It includes a code editor, debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular
28+
programming languages, including JavaScript, Python, PHP, and more, so you don’t need to install files or configure your
29+
development machine to start new projects. Since your Cloud9 IDE is cloud-based, you can work on your projects from your
30+
office, home, or anywhere using an internet-connected machine. Cloud9 also provides a seamless experience for developing
31+
serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of
32+
serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair
3333
program and track each other's inputs in real time.
3434

3535

3636
## Creating EC2 Environment
3737

38-
EC2 Environments are defined with `Ec2Environment`. To create an EC2 environment in the private subnet, specify
38+
EC2 Environments are defined with `Ec2Environment`. To create an EC2 environment in the private subnet, specify
3939
`subnetSelection` with private `subnetType`.
4040

4141

@@ -52,7 +52,7 @@ new cloud9.Ec2Environment(this, 'Cloud9Env2', {
5252
imageId: cloud9.ImageId.AMAZON_LINUX_2,
5353
});
5454

55-
// or specify in a different subnetSelection
55+
// or specify in a different subnetSelection
5656
const c9env = new cloud9.Ec2Environment(this, 'Cloud9Env3', {
5757
vpc,
5858
subnetSelection: {
@@ -104,3 +104,39 @@ new cloud9.Ec2Environment(this, 'C9Env', {
104104
imageId: cloud9.ImageId.AMAZON_LINUX_2,
105105
});
106106
```
107+
108+
## Specifying Owners
109+
110+
Every Cloud9 Environment has an **owner**. An owner has full control over the environment, and can invite additional members to the environment for collaboration purposes. For more information, see [Working with shared environments in AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html)).
111+
112+
By default, the owner will be the identity that creates the Environment, which is most likely your CloudFormation Execution Role when the Environment is created using CloudFormation. Provider a value for the `owner` property to assign a different owner, either a specific IAM User or the AWS Account Root User.
113+
114+
`Owner` is a user that owns a Cloud9 environment . `Owner` has their own access permissions, resources. And we can specify an `Owner`in an Ec2 environment which could be of two types, 1. AccountRoot and 2. Iam User. It allows AWS to determine who has permissions to manage the environment, either an IAM user or the account root user (but using the account root user is not recommended, see [environment sharing best practices](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html#share-environment-best-practices)).
115+
116+
To specify the AWS Account Root User as the environment owner, use `Owner.accountRoot()`
117+
118+
```ts
119+
declare const vpc: ec2.Vpc;
120+
new cloud9.Ec2Environment(this, 'C9Env', {
121+
vpc,
122+
imageId: cloud9.ImageId.AMAZON_LINUX_2,
123+
124+
owner: cloud9.Owner.accountRoot('111111111')
125+
})
126+
```
127+
128+
To specify a specific IAM User as the environment owner, use `Owner.user()`. The user should have the `AWSCloud9Administrator` managed policy
129+
130+
```ts
131+
import * as iam from '@aws-cdk/aws-iam';
132+
133+
const user = new iam.User(this, 'user');
134+
user.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AWSCloud9Administrator'));
135+
declare const vpc: ec2.Vpc;
136+
new cloud9.Ec2Environment(this, 'C9Env', {
137+
vpc,
138+
imageId: cloud9.ImageId.AMAZON_LINUX_2,
139+
140+
owner: cloud9.Owner.user(user)
141+
})
142+
```

packages/@aws-cdk/aws-cloud9/lib/environment.ts

+46-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as codecommit from '@aws-cdk/aws-codecommit';
22
import * as ec2 from '@aws-cdk/aws-ec2';
3+
import { IUser } from '@aws-cdk/aws-iam';
34
import * as cdk from '@aws-cdk/core';
45
import { Construct } from 'constructs';
56
import { CfnEnvironmentEC2 } from '../lib/cloud9.generated';
@@ -53,11 +54,19 @@ export enum ImageId {
5354
*/
5455
UBUNTU_18_04 = 'ubuntu-18.04-x86_64'
5556
}
56-
5757
/**
5858
* Properties for Ec2Environment
5959
*/
6060
export interface Ec2EnvironmentProps {
61+
/**
62+
* Owner of the environment.
63+
*
64+
* The owner has full control of the environment and can invite additional members.
65+
*
66+
* @default - The identity that CloudFormation executes under will be the owner
67+
*/
68+
readonly owner?: Owner;
69+
6170
/**
6271
* The type of instance to connect to the environment.
6372
*
@@ -182,6 +191,7 @@ export class Ec2Environment extends cdk.Resource implements IEc2Environment {
182191
const c9env = new CfnEnvironmentEC2(this, 'Resource', {
183192
name: props.ec2EnvironmentName,
184193
description: props.description,
194+
ownerArn: props.owner?.ownerArn,
185195
instanceType: props.instanceType?.toString() ?? ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.MICRO).toString(),
186196
subnetId: this.vpc.selectSubnets(vpcSubnets).subnetIds[0],
187197
repositories: props.clonedRepositories ? props.clonedRepositories.map(r => ({
@@ -217,3 +227,38 @@ export class CloneRepository {
217227

218228
private constructor(public readonly repositoryUrl: string, public readonly pathComponent: string) {}
219229
}
230+
231+
/**
232+
* An environment owner
233+
*
234+
*
235+
*/
236+
export class Owner {
237+
/**
238+
* Make an IAM user the environment owner
239+
*
240+
* User need to have AWSCloud9Administrator permissions
241+
* @see https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html#share-environment-about
242+
*
243+
* @param user the User object to use as the environment owner
244+
*/
245+
public static user(user: IUser): Owner {
246+
return { ownerArn: user.userArn };
247+
}
248+
249+
250+
/**
251+
* Make the Account Root User the environment owner (not recommended)
252+
*
253+
* @param accountId the AccountId to use as the environment owner.
254+
*/
255+
public static accountRoot(accountId: string): Owner {
256+
return { ownerArn: `arn:aws:iam::${accountId}:root` };
257+
}
258+
259+
/**
260+
*
261+
* @param ownerArn of environment owner.
262+
*/
263+
private constructor(public readonly ownerArn: string) {}
264+
}

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

+2
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,15 @@
9292
"dependencies": {
9393
"@aws-cdk/aws-codecommit": "0.0.0",
9494
"@aws-cdk/aws-ec2": "0.0.0",
95+
"@aws-cdk/aws-iam": "0.0.0",
9596
"@aws-cdk/core": "0.0.0",
9697
"constructs": "^10.0.0"
9798
},
9899
"homepage": "https://github.com/aws/aws-cdk",
99100
"peerDependencies": {
100101
"@aws-cdk/aws-codecommit": "0.0.0",
101102
"@aws-cdk/aws-ec2": "0.0.0",
103+
"@aws-cdk/aws-iam": "0.0.0",
102104
"@aws-cdk/core": "0.0.0",
103105
"constructs": "^10.0.0"
104106
},

packages/@aws-cdk/aws-cloud9/test/cloud9.environment.test.ts

+33-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { Match, Template } from '@aws-cdk/assertions';
22
import * as codecommit from '@aws-cdk/aws-codecommit';
33
import * as ec2 from '@aws-cdk/aws-ec2';
4+
import * as iam from '@aws-cdk/aws-iam';
45
import * as cdk from '@aws-cdk/core';
56
import * as cloud9 from '../lib';
6-
import { ConnectionType, ImageId } from '../lib';
7+
import { ConnectionType, ImageId, Owner } from '../lib';
78

89
let stack: cdk.Stack;
910
let vpc: ec2.IVpc;
@@ -79,7 +80,6 @@ test('throw error when subnetSelection not specified and the provided VPC has no
7980
test('can use CodeCommit repositories', () => {
8081
// WHEN
8182
const repo = codecommit.Repository.fromRepositoryName(stack, 'Repo', 'foo');
82-
8383
new cloud9.Ec2Environment(stack, 'C9Env', {
8484
vpc,
8585
clonedRepositories: [
@@ -114,6 +114,37 @@ test('can use CodeCommit repositories', () => {
114114
});
115115
});
116116

117+
test('environment owner can be an IAM user', () => {
118+
// WHEN
119+
const user = new iam.User(stack, 'User', {
120+
userName: 'testUser',
121+
});
122+
new cloud9.Ec2Environment(stack, 'C9Env', {
123+
vpc,
124+
imageId: cloud9.ImageId.AMAZON_LINUX_2,
125+
owner: Owner.user(user),
126+
});
127+
// THEN
128+
Template.fromStack(stack).hasResourceProperties('AWS::Cloud9::EnvironmentEC2', {
129+
OwnerArn: {
130+
'Fn::GetAtt': ['User00B015A1', 'Arn'],
131+
},
132+
});
133+
});
134+
135+
test('environment owner can be account root', () => {
136+
// WHEN
137+
new cloud9.Ec2Environment(stack, 'C9Env', {
138+
vpc,
139+
imageId: cloud9.ImageId.AMAZON_LINUX_2,
140+
owner: Owner.accountRoot('12345678'),
141+
});
142+
// THEN
143+
Template.fromStack(stack).hasResourceProperties('AWS::Cloud9::EnvironmentEC2', {
144+
OwnerArn: 'arn:aws:iam::12345678:root',
145+
});
146+
});
147+
117148
test.each([
118149
[ConnectionType.CONNECT_SSH, 'CONNECT_SSH'],
119150
[ConnectionType.CONNECT_SSM, 'CONNECT_SSM'],

packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-group.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export class EcsDeploymentGroup extends DeploymentGroupBase implements IEcsDeplo
222222
this.alarms = props.alarms || [];
223223

224224
this.role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AWSCodeDeployRoleForECS'));
225-
this.deploymentConfig = props.deploymentConfig || EcsDeploymentConfig.ALL_AT_ONCE;
225+
this.deploymentConfig = this._bindDeploymentConfig(props.deploymentConfig || EcsDeploymentConfig.ALL_AT_ONCE);
226226

227227
if (cdk.Resource.isOwnedResource(props.service)) {
228228
const cfnSvc = (props.service as ecs.BaseService).node.defaultChild as ecs.CfnService;
@@ -358,6 +358,6 @@ class ImportedEcsDeploymentGroup extends ImportedDeploymentGroupBase implements
358358
});
359359

360360
this.application = props.application;
361-
this.deploymentConfig = props.deploymentConfig || EcsDeploymentConfig.ALL_AT_ONCE;
361+
this.deploymentConfig = this._bindDeploymentConfig(props.deploymentConfig || EcsDeploymentConfig.ALL_AT_ONCE);
362362
}
363363
}

packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export class LambdaDeploymentGroup extends DeploymentGroupBase implements ILambd
162162
this.alarms = props.alarms || [];
163163

164164
this.role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSCodeDeployRoleForLambdaLimited'));
165-
this.deploymentConfig = props.deploymentConfig || LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES;
165+
this.deploymentConfig = this._bindDeploymentConfig(props.deploymentConfig || LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES);
166166

167167
const resource = new CfnDeploymentGroup(this, 'Resource', {
168168
applicationName: this.application.applicationName,
@@ -290,6 +290,6 @@ class ImportedLambdaDeploymentGroup extends ImportedDeploymentGroupBase implemen
290290
});
291291

292292
this.application = props.application;
293-
this.deploymentConfig = props.deploymentConfig || LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES;
293+
this.deploymentConfig = this._bindDeploymentConfig(props.deploymentConfig || LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES);
294294
}
295295
}

0 commit comments

Comments
 (0)