Created
October 19, 2021 05:58
-
-
Save aidansteele/76b7660014b174f251989a83d9e27e36 to your computer and use it in GitHub Desktop.
Revisions
-
aidansteele created this gist
Oct 19, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ Transform: AWS::Serverless-2016-10-31 Resources: Function: Type: AWS::Serverless::Function Properties: Runtime: python3.9 Handler: index.handler InlineCode: | import json import base64 def handler(event, context): print(json.dumps(event)) if event['isBase64Encoded']: print(base64.b64decode(event['body']).decode('utf-8')) else: print(event['body']) Events: DemoApi: Type: HttpApi Outputs: Function: Value: !Ref Function Url: Value: !GetAtt ServerlessHttpApi.ApiEndpoint