-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
50 lines (46 loc) · 1.52 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
service: alexa-wgtn-rubbish
provider:
name: aws
runtime: nodejs8.10
profile: personal
environment:
DYNAMODB_TABLE: ${self:service}-${opt:stage, self:provider.stage}
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: "arn:aws:dynamodb:${opt:region, self:provider.region}:*:table/${self:provider.environment.DYNAMODB_TABLE}"
functions:
skill:
handler: handler.handler
events:
- alexaSkill: amzn1.ask.skill.193bd5d0-111c-48e8-8fd5-25777c77d5b9
environment:
WCC_API_HOST: https://wellington.govt.nz
WCC_API_STREETS_PATH: /layouts/wcc/GeneralLayout.aspx/GetRubbishCollectionStreets
WCC_API_COLLECTION_SCHEDULE_PATH: /services/environment-and-waste/rubbish-and-recycling/collection-days/components/collection-search-results
GCP_GEOCODE_API_KEY: ${ssm:alexa-wgtn-rubbish-gcp-key}
ALEXA_PERMISSIONS_GRANT: 'read::alexa:device:all:address'
resources:
Resources:
TodosDynamoDbTable:
Type: 'AWS::DynamoDB::Table'
DeletionPolicy: Retain
Properties:
AttributeDefinitions:
-
AttributeName: id
AttributeType: S
KeySchema:
-
AttributeName: id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 1
TableName: ${self:provider.environment.DYNAMODB_TABLE}