Skip to content

Instantly share code, notes, and snippets.

@Yloganathan
Last active May 20, 2019 18:25
Show Gist options
  • Save Yloganathan/b0401ebeaa0c19538c4b637ba87c6f40 to your computer and use it in GitHub Desktop.
Save Yloganathan/b0401ebeaa0c19538c4b637ba87c6f40 to your computer and use it in GitHub Desktop.
Serverless Framework yml for simple app
service: idea-app-api
provider:
name: aws
runtime: python3.7
memorySize: 512
timeout: 30
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:DescribeTable
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: "arn:aws:dynamodb:us-east-1:*:*"
functions:
idea-crud:
handler: ideas.handler
events:
- http:
path: ideas
method: post
cors: true
- http:
path: ideas/{id}
method: patch
cors: true
- http:
path: ideas/{id}
method: get
cors: true
- http:
path: ideas/{id}
method: delete
cors: true
- http:
path: ideas
method: get
cors: true
resources:
# API Gateway Errors
- ${file(resources/api-gateway-errors.yml)}
# DynamoDB
- ${file(resources/dynamo-table.yml)}
# S3 to host the front end
- ${file(resources/s3-bucket.yml)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment