-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
34 lines (28 loc) · 897 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
MyBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub "vidbucket-${AWS::AccountId}"
HelloWorldFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
CodeUri: hello_world/
Handler: app.lambda_handler
Runtime: python3.10
Timeout: 200
Architectures:
- x86_64
Policies:
- S3CrudPolicy:
BucketName: !Sub "vidbucket-${AWS::AccountId}"
- S3WritePolicy:
BucketName: thumbnail876
Events:
S3Event:
Type: S3
Properties:
Bucket: !Ref MyBucket
Events:
- s3:ObjectCreated:*