Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(apigatewayv2): graduate to stable 🚀 #28094

Merged
merged 68 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
3ffa00d
create new module, delete old aws-apigatewayv2 package
sumupitchayan Nov 21, 2023
bda103a
add lint exemptions to aws-cdk-lib/awslint.json and update of exceptions
sumupitchayan Nov 21, 2023
d783fad
add generated file to lib/index.ts
sumupitchayan Nov 21, 2023
8aff955
delete module's eslintrc.js
sumupitchayan Nov 21, 2023
8842990
delete module's .gitignore
sumupitchayan Nov 21, 2023
4e53fb7
delete module's npmignore
sumupitchayan Nov 21, 2023
29ef7a0
delete module's package.json
sumupitchayan Nov 21, 2023
e5fb5a5
delete LICENSE, NOTICE, jest.config files
sumupitchayan Nov 21, 2023
a631b74
delete module's rosetta folder
sumupitchayan Nov 21, 2023
185168c
move integ tests to @aws-cdk-testing/framework-integ
sumupitchayan Nov 21, 2023
4682c71
try updating import statements, some stuff might be wrong here though…
sumupitchayan Nov 21, 2023
14007ff
fix import statements
sumupitchayan Nov 22, 2023
f1e6439
Merge branch 'main' into sumughan/stabilize-aws-apigatewayv2-alpha
sumupitchayan Nov 22, 2023
879abb5
fix test file core imports
sumupitchayan Nov 22, 2023
557693f
Merge branch 'sumughan/stabilize-aws-apigatewayv2-alpha' of https://g…
sumupitchayan Nov 22, 2023
194f047
fix module path, remove -alpha
sumupitchayan Nov 22, 2023
c46c5a8
FIX linter exceptions again
sumupitchayan Nov 22, 2023
007d0f5
fix integ test imports
sumupitchayan Nov 22, 2023
485c29e
remove stability banner from README
sumupitchayan Nov 22, 2023
0872131
remove alpha imports from README
sumupitchayan Nov 22, 2023
e4cb1b8
remove depredated property
sumupitchayan Nov 22, 2023
bdb5b56
mark module as deprecated in package.json
sumupitchayan Nov 22, 2023
d783111
update alpha module readme banner to deprecated
sumupitchayan Nov 22, 2023
9d379ba
typo
sumupitchayan Nov 22, 2023
0b51ce5
add docstring to httpApiId
sumupitchayan Nov 22, 2023
5cd6480
Merge branch 'main' into sumughan/stabilize-aws-apigatewayv2-alpha
sumupitchayan Nov 27, 2023
46cde46
add doc string inside httpapi class
sumupitchayan Nov 27, 2023
15bd169
delete features from package.json in alpha module
sumupitchayan Nov 27, 2023
0c42716
import typo
sumupitchayan Nov 27, 2023
10ca02b
Merge branch 'main' into sumughan/stabilize-aws-apigatewayv2-alpha
sumupitchayan Nov 27, 2023
5110ba9
fix readme imports to integrations module, which is still in alpha
sumupitchayan Nov 27, 2023
8591843
fix readme imports again
sumupitchayan Nov 27, 2023
d3f76a4
switch references in related alpha modules imports to aws-cdk-lib/api…
sumupitchayan Nov 28, 2023
1cd22ee
duplicate modules to aws-cdk-lib
sumupitchayan Nov 28, 2023
99da172
delete eslintrc.js for 2 new modules
sumupitchayan Nov 28, 2023
c226765
delete gitignore files for 2 new modules
sumupitchayan Nov 28, 2023
02d5450
delete npmignore files for 2 new modules
sumupitchayan Nov 28, 2023
2fb332a
delete package.json for the 2 new modules
sumupitchayan Nov 28, 2023
879a0ca
delete LICENSE, NOTICE and jest.config.js for the 2 new modules
sumupitchayan Nov 28, 2023
4af6c12
copy authorizer tests to @aws-cdk-testing for integ tests
sumupitchayan Nov 28, 2023
ee1af98
fix, put integ test in websocket folder
sumupitchayan Nov 28, 2023
af50d3e
delete integ tests from apigwv2-auth module
sumupitchayan Nov 28, 2023
59dc7fe
add integ tests to apigw-integrations in @aws-cdk-testing
sumupitchayan Nov 28, 2023
2cd4742
remove auth handler from aws-cdk-lib, add to authorizer module integ …
sumupitchayan Nov 28, 2023
55e0e37
remove integ tests from aws-apigatewayv2-integrations
sumupitchayan Nov 28, 2023
4e538cc
update import statements of integ tests
sumupitchayan Nov 28, 2023
b2b3d9f
update import statements in authorizers module
sumupitchayan Nov 28, 2023
1fc6195
update rosetta fixture in auth module
sumupitchayan Nov 28, 2023
86cc651
update import statements for integrations module
sumupitchayan Nov 28, 2023
4d2243f
fix import statements in unit tests
sumupitchayan Nov 28, 2023
193634d
delete rosetta folders for 2 new modules
sumupitchayan Nov 28, 2023
3fec5d9
run yarn lint --fix, building aws-cdk-lib now works successfully
sumupitchayan Nov 28, 2023
f3a6560
update README for both modules, remove stability banner and update im…
sumupitchayan Nov 28, 2023
ae20c7a
yarn lint on auth module
sumupitchayan Nov 28, 2023
5725076
mark old alpha modules as deprecated for auth and integratins
sumupitchayan Nov 28, 2023
a4e4575
Merge branch 'main' into sumughan/stabilize-aws-apigatewayv2-alpha
sumupitchayan Nov 28, 2023
526c398
fix alpha module imports for integrations module
sumupitchayan Nov 28, 2023
40ad79b
Merge branch 'sumughan/stabilize-aws-apigatewayv2-alpha' of https://g…
sumupitchayan Nov 28, 2023
0e5d648
fix imports in framework-integ
sumupitchayan Nov 28, 2023
f900385
add 2 new modules to package.json exports and create index.ts files i…
sumupitchayan Nov 28, 2023
3f78d2e
fix integ.alb.ts import
sumupitchayan Nov 28, 2023
1149ed1
add snapshots back to integ.iam for auth/websocket test
sumupitchayan Nov 29, 2023
392be7b
fix rosetta errors, alpha imports in apigwv2 readme
sumupitchayan Nov 29, 2023
785f339
Merge branch 'main' into sumughan/stabilize-aws-apigatewayv2-alpha
sumupitchayan Nov 29, 2023
0ba6078
delete module-level awslint.json for the 3 new modules
sumupitchayan Nov 29, 2023
b2c8e06
fix github regex warning by throwing error if string path is too long…
sumupitchayan Nov 29, 2023
3e8d8bc
remove unnecessary linter rules
sumupitchayan Nov 29, 2023
a133e80
Merge branch 'main' into sumughan/stabilize-aws-apigatewayv2-alpha
mergify[bot] Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable no-console */

export const handler = async (event: AWSLambda.APIGatewayProxyEventV2) => {
const key = event.headers['x-api-key'];

return {
isAuthorized: key === '123',
};
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
{
"Resources": {
"User00B015A1": {
"Type": "AWS::IAM::User"
},
"UserDefaultPolicy1F97781E": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": "execute-api:Invoke",
"Effect": "Allow",
"Resource": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":execute-api:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":",
{
"Ref": "HttpApiF5A9A8A7"
},
"/*/*/books/*"
]
]
},
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":execute-api:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":",
{
"Ref": "HttpApiF5A9A8A7"
},
"/*/*/foo"
]
]
}
]
}
],
"Version": "2012-10-17"
},
"PolicyName": "UserDefaultPolicy1F97781E",
"Users": [
{
"Ref": "User00B015A1"
}
]
}
},
"UserAccessEC42ADF7": {
"Type": "AWS::IAM::AccessKey",
"Properties": {
"UserName": {
"Ref": "User00B015A1"
}
}
},
"HttpApiF5A9A8A7": {
"Type": "AWS::ApiGatewayV2::Api",
"Properties": {
"Name": "HttpApi",
"ProtocolType": "HTTP"
}
},
"HttpApiDefaultStage3EEB07D6": {
"Type": "AWS::ApiGatewayV2::Stage",
"Properties": {
"ApiId": {
"Ref": "HttpApiF5A9A8A7"
},
"StageName": "$default",
"AutoDeploy": true
}
},
"HttpApiANYfooexamplecom903F7A9F": {
"Type": "AWS::ApiGatewayV2::Integration",
"Properties": {
"ApiId": {
"Ref": "HttpApiF5A9A8A7"
},
"IntegrationType": "HTTP_PROXY",
"IntegrationMethod": "GET",
"IntegrationUri": "https://www.example.com/",
"PayloadFormatVersion": "1.0"
}
},
"HttpApiANYfooD178456F": {
"Type": "AWS::ApiGatewayV2::Route",
"Properties": {
"ApiId": {
"Ref": "HttpApiF5A9A8A7"
},
"RouteKey": "ANY /foo",
"AuthorizationType": "AWS_IAM",
"Target": {
"Fn::Join": [
"",
[
"integrations/",
{
"Ref": "HttpApiANYfooexamplecom903F7A9F"
}
]
]
}
}
},
"HttpApiANYbooksbookexamplecom5C333C98": {
"Type": "AWS::ApiGatewayV2::Integration",
"Properties": {
"ApiId": {
"Ref": "HttpApiF5A9A8A7"
},
"IntegrationType": "HTTP_PROXY",
"IntegrationMethod": "GET",
"IntegrationUri": "https://www.example.com/",
"PayloadFormatVersion": "1.0"
}
},
"HttpApiANYbooksbook2F78361C": {
"Type": "AWS::ApiGatewayV2::Route",
"Properties": {
"ApiId": {
"Ref": "HttpApiF5A9A8A7"
},
"RouteKey": "ANY /books/{book}",
"AuthorizationType": "AWS_IAM",
"Target": {
"Fn::Join": [
"",
[
"integrations/",
{
"Ref": "HttpApiANYbooksbookexamplecom5C333C98"
}
]
]
}
}
}
},
"Outputs": {
"API": {
"Value": {
"Fn::Join": [
"",
[
"https://",
{
"Ref": "HttpApiF5A9A8A7"
},
".execute-api.",
{
"Ref": "AWS::Region"
},
".",
{
"Ref": "AWS::URLSuffix"
},
"/"
]
]
}
},
"TESTACCESSKEYID": {
"Value": {
"Ref": "UserAccessEC42ADF7"
}
},
"TESTSECRETACCESSKEY": {
"Value": {
"Fn::GetAtt": [
"UserAccessEC42ADF7",
"SecretAccessKey"
]
}
},
"TESTREGION": {
"Value": {
"Ref": "AWS::Region"
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading