Skip to content

Instantly share code, notes, and snippets.

@alfonsogoberjr
Last active May 23, 2018 15:14
Show Gist options
  • Save alfonsogoberjr/a554107496bf1f7da9e9822db39ae9f7 to your computer and use it in GitHub Desktop.
Save alfonsogoberjr/a554107496bf1f7da9e9822db39ae9f7 to your computer and use it in GitHub Desktop.
serverless-geolocation service - serverless.yml
service: geolocation
custom:
stage: ${opt:stage, self:provider.stage}
provider:
name: aws
runtime: nodejs6.10 # Node 8 is not yet supported by Lambda@Edge, only in normal Lambda
stage: dev
memorySize: 256
timeout: 30
region: us-east-1
apiKeys:
- ${self:custom.stage}-geolocation-apikey
iamRoleStatements:
- Effect: "Allow"
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Resource: "*"
functions:
edgeRedirect:
handler: handler.edgeRedirect
countryLookup:
handler: handler.countryLookup
events:
- http:
path: /
method: get
private: true
cors: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment