This repository was archived by the owner on May 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserverless.example.yml
82 lines (76 loc) · 2.41 KB
/
serverless.example.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
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
82
service: ${env:APP_NAME}
variablesResolutionMode: 20210326
frameworkVersion: '2'
configValidationMode: error
plugins:
# https://www.serverless.com/plugins/serverless-offline/
- serverless-offline
# https://www.serverless.com/plugins/serverless-plugin-resource-tagging/
- serverless-plugin-resource-tagging
# https://www.serverless.com/plugins/serverless-tag-cloud-watch-logs/
- serverless-tag-cloud-watch-logs
# https://www.npmjs.com/package/serverless-offline-sqs
- serverless-offline-sqs
# https://www.serverless.com/plugins/serverless-newrelic-lambda-layers
- serverless-newrelic-lambda-layers
provider:
name: aws
region: ${env:AWS_REGION}
logRetentionInDays: ${env:LOG_RETENTION_IN_DAYS}
lambdaHashingVersion: 20201221
environment: ${ssm:/aws/reference/secretsmanager/${env:SECRETS_NAME}}
apiGateway:
shouldStartNameWithService: true
deploymentBucket: ${env:LAMBDA_DEPLOYMENT_BUCKET}
deploymentPrefix: ${self:service}
stackTags:
App: "${env:APP_NAME}"
Env: "${env:ENVIRONMENT_NAME}"
Iac: "serverless-ci-IAC-VERSION"
Repository: "${env:REPOSITORY_NAME}"
custom:
cloudWatchLogsTags:
App: ${env:APP_NAME}
Env: ${env:ENVIRONMENT_NAME}
Iac: serverless-ci-IAC-VERSION
Repository: ${env:REPOSITORY_NAME}
newRelic:
accountId: ${self:provider.environment.NEW_RELIC_ACCOUNT_ID}
apiKey: ${self:provider.environment.NEW_RELIC_API_KEY}
enableExtension: true
enableIntegration: true
logEnabled: false
debug: true
package:
patterns:
- '!buildspec.yaml'
- '!infrastructure/**'
functions:
app:
handler: ${env:LAMBDA_HANDLER}
name: ${env:APP_NAME}-${env:ENVIRONMENT_NAME}
runtime: ${env:LAMBDA_RUNTIME}
memorySize: ${env:LAMBDA_MEMORY_SIZE}
timeout: ${env:LAMBDA_TIMEOUT}
maximumRetryAttempts: ${env:LAMBDA_MAXIMUM_RETRY_ATTEMPTS}
role: ${env:LAMBDA_EXECUTION_ROLE_ARN}
destinations:
onFailure: ${env:SQS_DEAD_QUEUE_ARN_0}
events:
- sqs:
arn: ${env:SQS_QUEUE_ARN_0}
# por hora desativado até migrar da antiga para a nova
enabled: true
batchSize: 1
maximumBatchingWindow: 10
vpc:
securityGroupIds:
- ${env:LAMBDA_SECURITY_GROUP_ID}
subnetIds:
- ${env:SUBNET_ID_0}
- ${env:SUBNET_ID_1}
environment:
APP_ENV: ${env:ENVIRONMENT_NAME}
DEBUG: false
LOG_LEVEL: info
REGION_NAME: ${env:AWS_REGION}