-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserverless.yml
More file actions
38 lines (35 loc) · 1.44 KB
/
Copy pathserverless.yml
File metadata and controls
38 lines (35 loc) · 1.44 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
service: lambda-run
custom:
defaultStage: dev
environment:
dev: ${file(./environments/dev.yml)}
provider:
name: aws
region: ${self:custom.environment.${self:provider.stage}.MY_AWS_REGION}
apiGateway:
shouldStartNameWithService: "true"
vpc:
securityGroupIds:
- ${self:custom.environment.${self:provider.stage}.MY_AWS_SECURITY_GROUP}
subnetIds:
- ${self:custom.environment.${self:provider.stage}.MY_AWS_SUBNET_ID_0}
- ${self:custom.environment.${self:provider.stage}.MY_AWS_SUBNET_ID_1}
- ${self:custom.environment.${self:provider.stage}.MY_AWS_SUBNET_ID_2}
iamRoleStatements:
- Effect: "Allow"
Action:
- "ec2:CreateNetworkInterface"
- "ec2:DescribeNetworkInterfaces"
- "ec2:DeleteNetworkInterface"
Resource:
- "*"
functions:
app:
image: ${self:custom.environment.${self:provider.stage}.MY_AWS_ACCOUNT_ID}.dkr.ecr.${self:provider.region}.amazonaws.com/${self:service}@${self:custom.environment.${self:provider.stage}.AWS_APP_CONTAINER_HASH}
events:
- http: ANY /
- http: 'ANY {proxy+}'
environment: ${self:custom.environment.${self:provider.stage}}
migrate:
image: ${self:custom.environment.${self:provider.stage}.MY_AWS_ACCOUNT_ID}.dkr.ecr.${self:provider.region}.amazonaws.com/${self:service}@${self:custom.environment.${self:provider.stage}.AWS_MIGRATE_CONTAINER_HASH}
environment: ${self:custom.environment.${self:provider.stage}}