Skip to content

Instantly share code, notes, and snippets.

@toricls
Last active December 15, 2017 00:11
Show Gist options
  • Save toricls/7d078e6d25515f26b73bfa3a6f4f0ec5 to your computer and use it in GitHub Desktop.
Save toricls/7d078e6d25515f26b73bfa3a6f4f0ec5 to your computer and use it in GitHub Desktop.
A 'Hello World' AWS SAM template (see transformed version here: https://gist.github.com/toricls/aa6866a0b2e59fd819cb69efd80bd2f2)
AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: A hello world application.
Resources:
# Lambda 関数を1つ定義して
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs6.10
CodeUri: src/
# この関数は以下のイベントで呼び出されます
Events:
GetResource:
Type: Api
Properties:
Path: /hello
Method: get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment