-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
41 lines (37 loc) · 986 Bytes
/
serverless.yml
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
frameworkVersion: "3"
service: reporting-file-rotations
provider:
name: aws
region: eu-west-2
runtime: provided.al2023
stage: ${env:STAGE}
deploymentBucket:
name: ${env:DEPLOYMENT_BUCKET}
environment:
DEBUG: "false"
DELETION_CANDIDATE_DAYS: "${env:DELETION_CANDIDATE_DAYS}"
ETF_BUCKET: "trade-tariff-reporting-${aws:accountId}"
iamRoleStatements:
- Effect: "Allow"
Action:
- s3:DeleteObject
- s3:GetObject
- s3:ListBucket
Resource:
- "arn:aws:s3:::trade-tariff-reporting-${aws:accountId}"
- "arn:aws:s3:::trade-tariff-reporting-${aws:accountId}/*"
- Effect: "Allow"
Action:
- kms:GenerateDataKey
- kms:Decrypt
Resource:
- "arn:aws:kms:${self:provider.region}:${aws:accountId}:key/*"
package:
patterns:
- "!./**"
- bootstrap
functions:
rotation:
handler: bootstrap
events:
- schedule: cron(0 8 * * ? *) # Run every day at 0800 UTC