-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtemplate.yaml
More file actions
81 lines (71 loc) · 2.25 KB
/
Copy pathtemplate.yaml
File metadata and controls
81 lines (71 loc) · 2.25 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Parameters:
MusicBucket:
Type: String
Description: Name of an existing S3 bucket with MP3 files. Put the artists tracks in separate folders in the root.
Default: marekmusic
AclS3:
Type: String
AllowedValues:
- public-read
- private
Description: The S3 ACL for the XML object that will be uploaded. Select either 'private' (default) or 'public-read'.
Default: private
PathPodcast:
Type: String
Description: Set the path where the XML file will be uploaded to S3 (default 'podcast.xml' in the root of the bucket).
Default: podcast.xml
NamePodcast:
Type: String
Description: Name of the podcast as shown feed.
Default: Serverless Podcast
AuthorPodcast:
Type: String
Description: Author name text in the podcast feed.
Default: Marek
DescPodcast:
Type: String
Description: Description text in the podcast feed.
Default: Listen to a podcast hosted on an S3 bucket.
UrlPodcast:
Type: String
Description: Description text in the podcast feed.
Default: https://yoururl.local/
ImgPodcast:
Type: String
Description: Image url for the logo in the podcast feed.
Default: https://yoururl.local/image.png
Description: >-
Build a serverless podcast feeds using your S3 bucket with music and Lambda.
Resources:
lambdapodcast:
Type: 'AWS::Serverless::Function'
Properties:
Handler: mp3.handler
Runtime: python3.8
Description: >-
Build a serverless podcast feeds using your S3 bucket with music and Lambda.
MemorySize: 256
Timeout: 20
CodeUri: lambda/
Tracing: Active
ReservedConcurrentExecutions: 1
Environment:
Variables:
s3_bucket: !Ref MusicBucket
podcast_path: !Ref PathPodcast
podcast_name: !Ref NamePodcast
podcast_author: !Ref AuthorPodcast
podcast_desc: !Ref DescPodcast
podcast_url: !Ref UrlPodcast
podcast_img: !Ref ImgPodcast
s3_acl: !Ref AclS3
Events:
Cron:
Type: Schedule
Properties:
Schedule: rate(1 hour)
Policies:
- S3CrudPolicy:
BucketName: !Ref MusicBucket