Last active
May 23, 2018 15:14
-
-
Save alfonsogoberjr/a554107496bf1f7da9e9822db39ae9f7 to your computer and use it in GitHub Desktop.
serverless-geolocation service - serverless.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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