Skip to content

Instantly share code, notes, and snippets.

@dsandor
Created January 15, 2024 13:11
Show Gist options
  • Save dsandor/77741e7f9756e5a6340905a4a911db3f to your computer and use it in GitHub Desktop.
Save dsandor/77741e7f9756e5a6340905a4a911db3f to your computer and use it in GitHub Desktop.
template.yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: CloudFormation Template for standing up aws resources for the API.
Globals:
Function:
Handler: bootstrap
Runtime: provided.al2
Timeout: 10
MemorySize: 128
Architectures:
- x86_64
Resources:
Api:
Type: 'AWS::Serverless::Api'
Properties:
StageName: dev
GetUserHandler:
Type: AWS::Serverless::Function
Properties:
CodeUri: lambda/get-user/
Events:
Api:
Type: Api
Properties:
RestApiId: !Ref Api
Path: /user
Method: get
Metadata:
BuildMethod: go1.x
Outputs:
ApiUrl:
Description: API Url
Value: !Sub "https://${Api}.execute-api.${AWS::Region}.amazonaws.com/dev/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment