Skip to content

Instantly share code, notes, and snippets.

@kuc-arc-f
Last active January 13, 2022 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuc-arc-f/9172da544a1d39a0f3b7f7b2ec8755fb to your computer and use it in GitHub Desktop.
Save kuc-arc-f/9172da544a1d39a0f3b7f7b2ec8755fb to your computer and use it in GitHub Desktop.
serverless.yml, Serverless Framework local sample
service: service2
custom:
dynamodb:
stages:
- dev
start:
port: 8000
inMemory: true
migrate: true
seed: false
plugins:
- serverless-dynamodb-local
- serverless-offline
frameworkVersion: '2'
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221
#
functions:
hello:
handler: handler.hello
events:
- http:
path: hello
method: any
cors: true
resources:
Resources:
TodosDynamoDbTable:
Type: 'AWS::DynamoDB::Table'
DeletionPolicy: Retain
Properties:
AttributeDefinitions:
-
AttributeName: id
AttributeType: S
KeySchema:
-
AttributeName: id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
TableName: 'todos'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment