-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunction-template.yaml
39 lines (39 loc) · 1.17 KB
/
function-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
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An AWS Serverless Specification template describing your function.
Resources:
ImageResizeLambdaEVE:
Type: 'AWS::Serverless::Function'
Properties:
Handler: index.handler
Runtime: nodejs8.10
CodeUri: .
Description: ''
MemorySize: 512
Timeout: 8
Role: !GetAtt ImageResizeLambdaRole.Arn
Events:
Api1:
Type: Api
Properties:
Path: '/{proxy+}'
Method: ANY
Environment:
Variables:
SOURCE_BUCKET: [SOURCE-BUCKET]
DEST_BUCKET: [DEST-BUCKET]
URL: ['https://SOMETHING.COM']
ImageResizeLambdaRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Action: ['sts:AssumeRole']
Effect: Allow
Principal:
Service: [lambda.amazonaws.com]
Version: 2012-10-17
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
- arn:aws:iam::aws:policy/AmazonS3FullAccess
- arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess