-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfrastructure.yaml
More file actions
54 lines (54 loc) · 1.51 KB
/
infrastructure.yaml
File metadata and controls
54 lines (54 loc) · 1.51 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Resources:
# cluster
Cluster:
Type: AWS::ECS::Cluster
Properties:
ClusterName: cluster
# service
Service:
Type: AWS::ECS::Service
Properties:
ServiceName: webapp
Cluster: !Ref Cluster
TaskDefinition: !Ref TaskDefinition
DeploymentConfiguration:
MinimumHealthyPercent: 100
MaximumPercent: 200
DesiredCount: 1
LaunchType: FARGATE
NetworkConfiguration:
AwsvpcConfiguration:
# DISABLE if using private subnets that access to NAT gateway
AssignPublicIp: ENABLED
Subnets:
- subnet-94e420ff
SecurityGroups:
- sg-0c8df9d2cd7c522e7
# task definition
TaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
-
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: /ecs/webapp
awslogs-region: us-east-2
awslogs-stream-prefix: ecs
PortMappings:
-
ContainerPort: 80
HostPort: 80
MemoryReservation: 128
Image: 590945069032.dkr.ecr.us-east-2.amazonaws.com/webapp:latest
Essential: true
Name: webapp
ExecutionRoleArn: arn:aws:iam::590945069032:role/ecsTaskExecutionRole
Memory: 512
TaskRoleArn: arn:aws:iam::590945069032:role/ecsTaskExecutionRole
RequiresCompatibilities:
- "FARGATE"
NetworkMode: awsvpc
Cpu: 256
Family: webapp