Skip to content

Commit 0c371d9

Browse files
authored
Merge branch 'master' into issue-17705
2 parents 111c6ce + 002202f commit 0c371d9

94 files changed

Lines changed: 3187 additions & 602 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.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
{"area":"package/tools","keywords":["cli","command line","init","synth","diff","bootstrap"],"labels":["package/tools"],"assignees":["rix0rrr"]},
2424
{"area":"@aws-cdk/alexa-ask","keywords":["alexa-ask","alexa", "cfnskill"],"labels":["@aws-cdk/alexa-ask"],"assignees":["madeline-k"]},
2525
{"area":"@aws-cdk/app-delivery","keywords":["app-delivery","PipelineDeployStackAction"],"labels":["@aws-cdk/app-delivery"],"assignees":["skinny85"]},
26-
{"area":"@aws-cdk/assert","keywords":["assert"],"labels":["@aws-cdk/assert"],"assignees":["kaizen3031593"]},
27-
{"area":"@aws-cdk/assertions","keywords":["assertions"],"labels":["@aws-cdk/assertions"],"assignees":["kaizen3031593"]},
26+
{"area":"@aws-cdk/assert","keywords":["assert", "@aws-cdk/assert"],"labels":["@aws-cdk/assert"],"assignees":["kaizen3031593"]},
27+
{"area":"@aws-cdk/assertions","keywords":["assertions", "@aws-cdk/assertions"],"labels":["@aws-cdk/assertions"],"assignees":["kaizen3031593"]},
2828
{"area":"@aws-cdk/assets","keywords":["assets","staging"],"labels":["@aws-cdk/assets"],"assignees":["eladb"]},
2929
{"area":"@aws-cdk/aws-accessanalyzer","keywords":["aws-accessanalyzer","accessanalyzer","cfnanalyzer"],"labels":["@aws-cdk/aws-accessanalyzer"],"assignees":["skinny85"]},
3030
{"area":"@aws-cdk/aws-acmpca","keywords":["aws-acmpca","acmpca","certificateauthority"],"labels":["@aws-cdk/aws-acmpca"],"assignees":["skinny85"]},

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,43 @@
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.137.0](https://github.com/aws/aws-cdk/compare/v1.136.0...v1.137.0) (2021-12-21)
6+
7+
8+
### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
9+
10+
* **opensearchservice:** imported domain property `domainEndpoint` used to contain `https://` prefix, now the prefix is dropped and it returns the same value as a `domainEndpoint` on a created domain
11+
12+
### Features
13+
14+
* **apigatewayv2:** http api - IAM authorizer support ([#17519](https://github.com/aws/aws-cdk/issues/17519)) ([fd8e0e3](https://github.com/aws/aws-cdk/commit/fd8e0e33816cb46678f7d1beac80b1623cdb6bac)), closes [#15123](https://github.com/aws/aws-cdk/issues/15123)
15+
* **aws-kinesis:** add support for data streams capacity modes ([#18074](https://github.com/aws/aws-cdk/issues/18074)) ([b265e46](https://github.com/aws/aws-cdk/commit/b265e4612a45af44defb7b6e1ff4a51c0231d10e)), closes [#18050](https://github.com/aws/aws-cdk/issues/18050)
16+
* **aws-s3:** Adding Intelligent Tiering to Bucket ([#18013](https://github.com/aws/aws-cdk/issues/18013)) ([890c4c5](https://github.com/aws/aws-cdk/commit/890c4c5f9d4835b39c8448e47c781b5e8334cd60)), closes [#16191](https://github.com/aws/aws-cdk/issues/16191)
17+
* **backup:** support continuous backup and point-in-time restores ([#17602](https://github.com/aws/aws-cdk/issues/17602)) ([24c6ef5](https://github.com/aws/aws-cdk/commit/24c6ef5164c66fa79b16fd5c8645e82764a52f87)), closes [#15922](https://github.com/aws/aws-cdk/issues/15922)
18+
* **cli:** add message when resource is hotswapped ([#18058](https://github.com/aws/aws-cdk/issues/18058)) ([e828c22](https://github.com/aws/aws-cdk/commit/e828c2229394fdf29699fd167c380bc229ea48e3)), closes [#17778](https://github.com/aws/aws-cdk/issues/17778)
19+
* **cli:** support hotswapping Lambda function tags ([#17818](https://github.com/aws/aws-cdk/issues/17818)) ([e4485f4](https://github.com/aws/aws-cdk/commit/e4485f4371dd5aafa538efeb82e016c40d197789)), closes [#17664](https://github.com/aws/aws-cdk/issues/17664)
20+
* **cli:** watch command now starts with a deployment ([#18057](https://github.com/aws/aws-cdk/issues/18057)) ([ace37a2](https://github.com/aws/aws-cdk/commit/ace37a24fda06616f7bbb5e2c9de01877d2ef0d7)), closes [#17776](https://github.com/aws/aws-cdk/issues/17776)
21+
* **codedeploy:** loadbalancer support for imported Target Groups ([#17848](https://github.com/aws/aws-cdk/issues/17848)) ([32f1c80](https://github.com/aws/aws-cdk/commit/32f1c807a34464e8c13a8d03bfdcb6a3006f51ba)), closes [#9677](https://github.com/aws/aws-cdk/issues/9677)
22+
* **codepipeline:** add ability to not reuse cross-region support Stacks ([#18043](https://github.com/aws/aws-cdk/issues/18043)) ([dcc9e59](https://github.com/aws/aws-cdk/commit/dcc9e59d55d17dd71217659573d5f1879295eb1b)), closes [#18018](https://github.com/aws/aws-cdk/issues/18018) [#18018](https://github.com/aws/aws-cdk/issues/18018)
23+
* **efs:** add support for transitioning files from infrequent access to primary storage ([#16522](https://github.com/aws/aws-cdk/issues/16522)) ([65414c6](https://github.com/aws/aws-cdk/commit/65414c655bfd08fab0c8113c7cfae19871a611c3))
24+
* **eks:** imported kubectl provider for imported clusters ([#14689](https://github.com/aws/aws-cdk/issues/14689)) ([19a287f](https://github.com/aws/aws-cdk/commit/19a287f02bc427644837956466213ee65457a857)), closes [#12107](https://github.com/aws/aws-cdk/issues/12107)
25+
* **eks:** install helm chart from asset ([#17217](https://github.com/aws/aws-cdk/issues/17217)) ([d3fc8c0](https://github.com/aws/aws-cdk/commit/d3fc8c07e2262a9f871e3a2b91f6e85471efd794))
26+
* **iam:** session tagging ([#17689](https://github.com/aws/aws-cdk/issues/17689)) ([9f22b2f](https://github.com/aws/aws-cdk/commit/9f22b2f89d6fe6930cbc57a37d0c72e823b58cf8)), closes [#15908](https://github.com/aws/aws-cdk/issues/15908) [#16725](https://github.com/aws/aws-cdk/issues/16725) [#2041](https://github.com/aws/aws-cdk/issues/2041) [#1578](https://github.com/aws/aws-cdk/issues/1578)
27+
* **rds:** Aurora clusters from snapshots ([#17759](https://github.com/aws/aws-cdk/issues/17759)) ([e5259ee](https://github.com/aws/aws-cdk/commit/e5259eec0c7df3129844bce3120eb32ffb575303)), closes [#10936](https://github.com/aws/aws-cdk/issues/10936) [#10130](https://github.com/aws/aws-cdk/issues/10130)
28+
29+
30+
### Bug Fixes
31+
32+
* **acm:** DnsValidatedCertificate intermittently fails with "Cannot read property 'Name' of undefined" ([#18033](https://github.com/aws/aws-cdk/issues/18033)) ([2b6c2da](https://github.com/aws/aws-cdk/commit/2b6c2dadc039f7c4255f6864386ba1dd28b6fc4f)), closes [#8282](https://github.com/aws/aws-cdk/issues/8282)
33+
* **apigateway:** race condition between Stage and CfnAccount ([#18011](https://github.com/aws/aws-cdk/issues/18011)) ([f11766e](https://github.com/aws/aws-cdk/commit/f11766ed774af3c5da83de2722e638878c1b321c))
34+
* **eks:** can't deploy with Bottlerocket amiType ([#17775](https://github.com/aws/aws-cdk/issues/17775)) ([b7be71c](https://github.com/aws/aws-cdk/commit/b7be71c55051916d3e1f7b09b8d178fa8783eae4)), closes [#17641](https://github.com/aws/aws-cdk/issues/17641) [#17641](https://github.com/aws/aws-cdk/issues/17641)
35+
* **eks:** cannot customize alb controller repository and version ([#18081](https://github.com/aws/aws-cdk/issues/18081)) ([e4256c8](https://github.com/aws/aws-cdk/commit/e4256c8f36e49aedb7b9f9b91fb4a88a031bdb49)), closes [#18054](https://github.com/aws/aws-cdk/issues/18054)
36+
* **eks:** the `defaultChild` of a `KubernetesManifest` is not a `CfnResource` ([#18052](https://github.com/aws/aws-cdk/issues/18052)) ([ef8ab72](https://github.com/aws/aws-cdk/commit/ef8ab7245630f54b5a633925e27b34c31b712abc))
37+
* **opensearchservice:** imported domain's `domainendpoint` is a url not an endpoint ([#18027](https://github.com/aws/aws-cdk/issues/18027)) ([fd149b1](https://github.com/aws/aws-cdk/commit/fd149b1e6557337b01d2232e2ba0fd410ba903dd)), closes [#18017](https://github.com/aws/aws-cdk/issues/18017)
38+
* **core, s3-deployment**: ResponseURL is logged by S3Deployment ([#18048](https://github.com/aws/aws-cdk/issues/18048)) ([ed19828](https://github.com/aws/aws-cdk/commit/ed19828e64d2bcd1be950f3e989ec2d14ad244a7))
39+
* **pipelines:** can't use exports from very long stack names ([#18039](https://github.com/aws/aws-cdk/issues/18039)) ([465dabf](https://github.com/aws/aws-cdk/commit/465dabf34ed86e3c4367cb28313955cead44ecdd)), closes [#17436](https://github.com/aws/aws-cdk/issues/17436)
40+
* **region-info:** ssm service principal is wrong in majority of regions ([#17984](https://github.com/aws/aws-cdk/issues/17984)) ([77144f5](https://github.com/aws/aws-cdk/commit/77144f5a1072feea7409b4222fbc80bd2bc86e71)), closes [#16188](https://github.com/aws/aws-cdk/issues/16188) [#17646](https://github.com/aws/aws-cdk/issues/17646)
41+
542
## [1.136.0](https://github.com/aws/aws-cdk/compare/v1.135.0...v1.136.0) (2021-12-15)
643

744

packages/@aws-cdk/aws-apigatewayv2-authorizers/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
- [JWT Authorizers](#jwt-authorizers)
2626
- [User Pool Authorizer](#user-pool-authorizer)
2727
- [Lambda Authorizers](#lambda-authorizers)
28+
- [IAM Authorizers](#iam-authorizers)
2829
- [WebSocket APIs](#websocket-apis)
2930
- [Lambda Authorizer](#lambda-authorizer)
3031

@@ -199,6 +200,30 @@ api.addRoutes({
199200
});
200201
```
201202

203+
### IAM Authorizers
204+
205+
API Gateway supports IAM via the included `HttpIamAuthorizer` and grant syntax:
206+
207+
```ts
208+
import { HttpIamAuthorizer } from '@aws-cdk/aws-apigatewayv2-authorizers';
209+
import { HttpUrlIntegration } from '@aws-cdk/aws-apigatewayv2-integrations';
210+
211+
declare const principal: iam.AnyPrincipal;
212+
213+
const authorizer = new HttpIamAuthorizer();
214+
215+
const httpApi = new apigwv2.HttpApi(this, 'HttpApi', {
216+
defaultAuthorizer: authorizer,
217+
});
218+
219+
const routes = httpApi.addRoutes({
220+
integration: new HttpUrlIntegration('BooksIntegration', 'https://get-books-proxy.myproxy.internal'),
221+
path: '/books/{book}',
222+
});
223+
224+
routes[0].grantInvoke(principal);
225+
```
226+
202227
## WebSocket APIs
203228

204229
You can set an authorizer to your WebSocket API's `$connect` route to control access to your API.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {
2+
HttpAuthorizerType,
3+
HttpRouteAuthorizerBindOptions,
4+
HttpRouteAuthorizerConfig,
5+
IHttpRouteAuthorizer,
6+
} from '@aws-cdk/aws-apigatewayv2';
7+
8+
/**
9+
* Authorize HTTP API Routes with IAM
10+
*/
11+
export class HttpIamAuthorizer implements IHttpRouteAuthorizer {
12+
public bind(_options: HttpRouteAuthorizerBindOptions): HttpRouteAuthorizerConfig {
13+
return {
14+
authorizationType: HttpAuthorizerType.IAM,
15+
};
16+
}
17+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from './user-pool';
22
export * from './jwt';
3-
export * from './lambda';
3+
export * from './lambda';
4+
export * from './iam';

packages/@aws-cdk/aws-apigatewayv2-authorizers/rosetta/default.ts-fixture

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { Construct } from 'constructs';
33
import { Duration, Stack } from '@aws-cdk/core';
44
import * as apigwv2 from '@aws-cdk/aws-apigatewayv2';
5+
import * as iam from '@aws-cdk/aws-iam';
56
import * as lambda from '@aws-cdk/aws-lambda';
67

78
class Fixture extends Stack {
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
{
2+
"Resources": {
3+
"User00B015A1": {
4+
"Type": "AWS::IAM::User"
5+
},
6+
"UserDefaultPolicy1F97781E": {
7+
"Type": "AWS::IAM::Policy",
8+
"Properties": {
9+
"PolicyDocument": {
10+
"Statement": [
11+
{
12+
"Action": "execute-api:Invoke",
13+
"Effect": "Allow",
14+
"Resource": {
15+
"Fn::Join": [
16+
"",
17+
[
18+
"arn:aws:execute-api:",
19+
{
20+
"Ref": "AWS::Region"
21+
},
22+
":",
23+
{
24+
"Ref": "AWS::AccountId"
25+
},
26+
":",
27+
{
28+
"Ref": "HttpApiF5A9A8A7"
29+
},
30+
"/*/*/foo"
31+
]
32+
]
33+
}
34+
},
35+
{
36+
"Action": "execute-api:Invoke",
37+
"Effect": "Allow",
38+
"Resource": {
39+
"Fn::Join": [
40+
"",
41+
[
42+
"arn:aws:execute-api:",
43+
{
44+
"Ref": "AWS::Region"
45+
},
46+
":",
47+
{
48+
"Ref": "AWS::AccountId"
49+
},
50+
":",
51+
{
52+
"Ref": "HttpApiF5A9A8A7"
53+
},
54+
"/*/*/books/*"
55+
]
56+
]
57+
}
58+
}
59+
],
60+
"Version": "2012-10-17"
61+
},
62+
"PolicyName": "UserDefaultPolicy1F97781E",
63+
"Users": [
64+
{
65+
"Ref": "User00B015A1"
66+
}
67+
]
68+
}
69+
},
70+
"UserAccess": {
71+
"Type": "AWS::IAM::AccessKey",
72+
"Properties": {
73+
"UserName": {
74+
"Ref": "User00B015A1"
75+
}
76+
}
77+
},
78+
"HttpApiF5A9A8A7": {
79+
"Type": "AWS::ApiGatewayV2::Api",
80+
"Properties": {
81+
"Name": "HttpApi",
82+
"ProtocolType": "HTTP"
83+
}
84+
},
85+
"HttpApiDefaultStage3EEB07D6": {
86+
"Type": "AWS::ApiGatewayV2::Stage",
87+
"Properties": {
88+
"ApiId": {
89+
"Ref": "HttpApiF5A9A8A7"
90+
},
91+
"StageName": "$default",
92+
"AutoDeploy": true
93+
}
94+
},
95+
"HttpApiANYfooexamplecom903F7A9F": {
96+
"Type": "AWS::ApiGatewayV2::Integration",
97+
"Properties": {
98+
"ApiId": {
99+
"Ref": "HttpApiF5A9A8A7"
100+
},
101+
"IntegrationType": "HTTP_PROXY",
102+
"IntegrationMethod": "GET",
103+
"IntegrationUri": "https://www.example.com/",
104+
"PayloadFormatVersion": "1.0"
105+
}
106+
},
107+
"HttpApiANYfooD178456F": {
108+
"Type": "AWS::ApiGatewayV2::Route",
109+
"Properties": {
110+
"ApiId": {
111+
"Ref": "HttpApiF5A9A8A7"
112+
},
113+
"RouteKey": "ANY /foo",
114+
"AuthorizationType": "AWS_IAM",
115+
"Target": {
116+
"Fn::Join": [
117+
"",
118+
[
119+
"integrations/",
120+
{
121+
"Ref": "HttpApiANYfooexamplecom903F7A9F"
122+
}
123+
]
124+
]
125+
}
126+
}
127+
},
128+
"HttpApiANYbooksbookexamplecom5C333C98": {
129+
"Type": "AWS::ApiGatewayV2::Integration",
130+
"Properties": {
131+
"ApiId": {
132+
"Ref": "HttpApiF5A9A8A7"
133+
},
134+
"IntegrationType": "HTTP_PROXY",
135+
"IntegrationMethod": "GET",
136+
"IntegrationUri": "https://www.example.com/",
137+
"PayloadFormatVersion": "1.0"
138+
}
139+
},
140+
"HttpApiANYbooksbook2F78361C": {
141+
"Type": "AWS::ApiGatewayV2::Route",
142+
"Properties": {
143+
"ApiId": {
144+
"Ref": "HttpApiF5A9A8A7"
145+
},
146+
"RouteKey": "ANY /books/{book}",
147+
"AuthorizationType": "AWS_IAM",
148+
"Target": {
149+
"Fn::Join": [
150+
"",
151+
[
152+
"integrations/",
153+
{
154+
"Ref": "HttpApiANYbooksbookexamplecom5C333C98"
155+
}
156+
]
157+
]
158+
}
159+
}
160+
}
161+
},
162+
"Outputs": {
163+
"API": {
164+
"Value": {
165+
"Fn::Join": [
166+
"",
167+
[
168+
"https://",
169+
{
170+
"Ref": "HttpApiF5A9A8A7"
171+
},
172+
".execute-api.",
173+
{
174+
"Ref": "AWS::Region"
175+
},
176+
".",
177+
{
178+
"Ref": "AWS::URLSuffix"
179+
},
180+
"/"
181+
]
182+
]
183+
}
184+
},
185+
"TESTACCESSKEYID": {
186+
"Value": {
187+
"Ref": "UserAccess"
188+
}
189+
},
190+
"TESTSECRETACCESSKEY": {
191+
"Value": {
192+
"Fn::GetAtt": [
193+
"UserAccess",
194+
"SecretAccessKey"
195+
]
196+
}
197+
},
198+
"TESTREGION": {
199+
"Value": {
200+
"Ref": "AWS::Region"
201+
}
202+
}
203+
}
204+
}

0 commit comments

Comments
 (0)