-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.yaml
56 lines (50 loc) · 1.33 KB
/
template.yaml
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
51
52
53
54
55
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: AWS Server-less demo application / movie database.
Resources:
APIGateway:
Type: AWS::Serverless::Api
Properties:
StageName: test
DefinitionBody:
'Fn::Transform':
Name: 'AWS::Include'
Parameters:
Location: swagger-sam.yaml
APILambda:
Type: AWS::Serverless::Function
Properties:
CodeUri: build/distributions/aws-serverless-movies-0.3.zip
Handler: be.houbrechts.it.awsserverless.APILambda::handleRequest
Runtime: java8
Events:
CatchAll:
Type: Api
Properties:
RestApiId: !Ref APIGateway
Path: /{proxy+}
Method: ANY
Environment:
Variables:
DYNAMO_ENDPOINT_URL: http://dynamodb:8000
Policies: AmazonDynamoDBFullAccess
MovieTable:
Type: AWS::Serverless::SimpleTable
Properties:
TableName: movies
PrimaryKey:
Name: id
Type: String
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
Outputs:
ApiUrl:
Description: URL of your API endpoint
Value: !Join
- ''
- - https://
- !Ref APIGateway
- '.execute-api.'
- !Ref 'AWS::Region'
- '.amazonaws.com/test'