Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Suport for Api gateway V2 #5

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
43 changes: 0 additions & 43 deletions .idea/workspace.xml

This file was deleted.

7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# 1.0.0 (2020-09-02)
# 1.0.1 (2024-08-26)

### Features

* AWS Api gateway v2 support ([5](https://github.com/digio/serverless-simple-alias/pull/4))

# 1.0.0 (2020-09-02)

### Features

Expand Down
82 changes: 82 additions & 0 deletions fixtures/serverless.correct.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,56 @@
"MethodResponses": []
}
},
"ApiGatewayIntegrationWebHookVarEventName": {
"Type": "AWS::ApiGatewayV2::Integration",
"Properties": {
"HttpMethod": "POST",
"RequestParameters": {
"method.request.path.cartContextKey": true
},
"ResourceId": {
"Ref": "ApiGatewayResourceWebHookVarChild"
},
"RestApiId": {
"Ref": "ApiGatewayRestApi"
},
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"IntegrationType": "AWS_PROXY",
"IntegrationUri": {
"Fn::GetAtt": [
"WebHookLambdaFunction",
"Arn"
]
},
"MethodResponses": []
}
},
"ApiGatewayIntegrationFoo": {
"Type": "AWS::ApiGatewayV2::Integration",
"Properties": {
"HttpMethod": "POST",
"RequestParameters": {
"method.request.path.cartContextKey": true
},
"ResourceId": {
"Ref": "ApiGatewayResourceFooChild"
},
"RestApiId": {
"Ref": "ApiGatewayRestApi"
},
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"IntegrationType": "AWS_PROXY",
"IntegrationUri": {
"Fn::GetAtt": [
"FooLambdaFunction",
"Arn"
]
},
"MethodResponses": []
}
},
"WebHookLambdaPermissionApiGateway": {
"Type": "AWS::Lambda::Permission",
"Properties": {
Expand Down Expand Up @@ -315,6 +365,38 @@
]
}
}
},
"ExternalLambdaPermissionApiGateway": {
"Type": "AWS::Lambda::Permission",
"Properties": {
"FunctionName": "arn:aws:lambda:us-west-2:123456789012:function:myLambdaFunction",
"Action": "lambda:InvokeFunction",
"Principal": "apigateway.amazonaws.com",
"SourceArn": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":execute-api:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":",
{
"Ref": "ApiGatewayRestApi"
},
"/*/*"
]
]
}
}
}
}
}
Expand Down
Loading