-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
109 lines (102 loc) · 2.71 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
service: cvs-svc-tsk-cert-gen
provider:
name: aws
runtime: nodejs18.x
tracing:
lambda: true # enable tracing
iam:
role:
statements:
- Effect: "Allow"
Action:
- "xray:PutTraceSegments"
- "xray:PutTelemetryRecords"
Resource:
- "*"
timeout: 600
plugins:
- serverless-plugin-typescript
- serverless-offline-sqs
- serverless-offline
- serverless-plugin-tracing
functions:
main:
tracing: false
handler: src/handler.handler
events:
- sqs:
arn:
Fn::GetAtt: [CertGen, Arn]
batchSize: 1
enabled: true
resources:
Resources:
CertBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: cvs-cert
SignatureBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: cvs-signature
CertGen:
Type: AWS::SQS::Queue
Properties:
QueueName: "cert-gen-q"
FeatureFlagApplication:
Type: AWS::AppConfig::Application
Properties:
Name: "cvs-app-config"
Description: "Contains the feature flag profile for the application"
Tags:
- Key: App
Value: "FeatureFlagApplication"
# - Key: Stage
# Value: "${self:provider.stage}"
# the application environment
FeatureFlagEnvironment:
Type: AWS::AppConfig::Environment
Properties:
ApplicationId: !Ref FeatureFlagApplication
Name: "develop"
Description: "Feature Flag Environment"
Tags:
- Key: App
Value: "cvs-app-config"
# - Key: Stage
# Value: "${self:provider.stage}"
# configuration profile
FeatureFlagAppConfigProfile:
Type: AWS::AppConfig::ConfigurationProfile
Properties:
ApplicationId: !Ref FeatureFlagApplication
Name: "vtx-profile"
LocationUri: "hosted"
# configuration
FeatureFlagConfigurationVersion:
Type: AWS::AppConfig::HostedConfigurationVersion
Properties:
ApplicationId: !Ref FeatureFlagApplication
ConfigurationProfileId: !Ref FeatureFlagAppConfigProfile
Description: "Feature Flag Application Config"
Content: !Sub |
{
"featureEnabled": true
}
ContentType: "application/json"
LatestVersionNumber: 1
custom:
s3:
host: s3
port: 7000
directory: /tmp
serverless-offline:
port: 3011
serverless-offline-sqs:
autoCreate: true
apiVersion: 2012-11-05
endpoint: http://0.0.0.0:9324
region: us-east-1 # Keep it as per your config
accessKeyId: root # this could be anything
secretAccessKey: root # this could be anything
skipCacheInvalidation: false