Created
July 20, 2021 00:51
-
-
Save aidansteele/bd5c3b6a8e950a5b0e20c81f0bda76db to your computer and use it in GitHub Desktop.
example http api gw w/ iam auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
Function: | |
Type: AWS::Serverless::Function | |
Properties: | |
Runtime: python3.8 | |
Handler: index.handler | |
InlineCode: | | |
def handler(a, b): | |
return {"hello": "world"} | |
Events: | |
Example: | |
Type: HttpApi | |
Properties: | |
ApiId: !Ref Api | |
Api: | |
Type: AWS::ApiGatewayV2::Api | |
Properties: | |
Name: myapi | |
ProtocolType: HTTP | |
Target: !GetAtt Function.Arn | |
Overrides: | |
Type: AWS::ApiGatewayV2::ApiGatewayManagedOverrides | |
Properties: | |
ApiId: !Ref Api | |
Route: | |
AuthorizationType: AWS_IAM | |
Outputs: | |
Url: | |
Value: !GetAtt Api.ApiEndpoint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment