-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathserverless.yml
42 lines (38 loc) · 917 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
42
# Welcome to serverless. Read the docs
# https://serverless.com/framework/docs/
service: fargate-dns-demo
provider:
name: aws
runtime: nodejs12.x
region: eu-central-1
iamRoleStatements:
- Effect: "Allow"
Action:
- "ec2:DescribeNetworkInterfaces"
- "ecs:DescribeClusters"
- "ecs:ListTagsForResource"
- "route53:ChangeResourceRecordSets"
Resource: "*"
functions:
registerPublicIp:
memorySize: 128
handler: src/update-task-dns.handler
events:
- cloudwatchEvent:
event:
source:
- "aws.ecs"
detail-type:
- "ECS Task State Change"
detail:
desiredStatus:
- "RUNNING"
lastStatus:
- "RUNNING"
package:
exclude:
- "**"
include:
- src/**
- node_modules/**
- "!node_modules/**/.serverless/**"