-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
53 lines (48 loc) · 1.24 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
service: aws-wellarchitected-review-collector
provider:
name: aws
runtime: nodejs18.x
stage: ${opt:stage, 'prod'}
region: ${opt:region, 'eu-north-1'}
memorySize: ${opt:memory, 512}
timeout: ${opt:timeout, 10}
logRetentionInDays: ${opt:logRetentionInDays, 7}
versionFunctions: false
deploymentBucket:
blockPublicAccess: true
maxPreviousDeploymentArtifacts: 5
serverSideEncryption: AES256
stackTags:
Usage: ${self:service}
tags:
Usage: ${self:service}
apiGateway:
minimumCompressionSize: 1024
plugins:
- serverless-esbuild
- serverless-offline
- serverless-iam-roles-per-function
package:
individually: true
custom:
config:
awsAccountNumber: ${opt:account, ''} # Add a fallback value if you want
esbuild:
bundle: true
minify: true
functions:
GetReviews:
handler: src/index.handler
description: Fetch high-level review data for a workload
events:
- httpApi:
method: GET
path: /reviews
iamRoleStatements:
- Effect: 'Allow'
Action:
- wellarchitected:ListLensReviews
Resource:
- arn:aws:wellarchitected:eu-north-1:${self:custom.config.awsAccountNumber}:workload/*
environment:
REGION: ${aws:region}