-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.yaml
48 lines (44 loc) · 988 Bytes
/
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
---
AWSTemplateFormatVersion: '2010-09-09'
Description: Libpostal Lambda
Parameters:
ImageName:
Type: String
ImageTag:
Type: String
Resources:
LambdaRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Sid: ''
Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action: sts:AssumeRole
Policies:
- PolicyName: S3Policy
PolicyDocument:
Version: '2012-10-17'
Statement:
- Sid: S3Policy
Effect: Allow
Action:
- s3:Get*
Resource:
- "*"
LambdaFunction:
Type: AWS::Lambda::Function
Properties:
Code:
ImageUri: !Sub "${ImageName}:${ImageTag}"
PackageType: Image
MemorySize: 8192
Timeout: 900
Role: !GetAtt LambdaRole.Arn
Outputs:
FunctionName:
Value: !Ref LambdaFunction