@@ -15,6 +15,7 @@ Metadata:
15
15
Parameters :
16
16
- ContainerName
17
17
- DesiredCount
18
+ - CPUReservation
18
19
- MemoryLimit
19
20
- MemoryReservation
20
21
- HealthCheckGracePeriodSeconds
@@ -51,7 +52,7 @@ Parameters:
51
52
52
53
HealthCheckGracePeriodSeconds :
53
54
Type : Number
54
- Default : 60
55
+ Default : 300
55
56
56
57
TaskDeregistrationDelay :
57
58
Type : Number
@@ -66,12 +67,20 @@ Parameters:
66
67
SpringProfile :
67
68
Type : String
68
69
70
+ CPUReservation :
71
+ Description : The number of cpu units to reserve for the container. This is only enforced when CPU cycles are constrained.
72
+ Type : Number
73
+ Default : 128
74
+ AllowedValues : [0, 10, 20, 32, 64, 128, 256, 512, 1024, 2048, 4096]
75
+
69
76
MemoryReservation :
77
+ Description : The memory reservation for the task, this is the expected upper limit during normal operations.
70
78
Type : Number
71
79
Default : 768
72
80
AllowedValues : [16, 32, 64, 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096]
73
81
74
82
MemoryLimit :
83
+ Description : The memory limit for the task, when reached the task will be automatically terminated
75
84
Type : Number
76
85
Default : 768
77
86
AllowedValues : [16, 32, 64, 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, 4096]
@@ -164,8 +173,15 @@ Resources:
164
173
- Name : !Ref ContainerName
165
174
Image : !Join ['', ["Fn::Sub": '${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/', "Fn::ImportValue": {"Fn::Sub":'${AWS::StackName}-RepositoryName'}, ':latest']]
166
175
Essential : true
176
+ Cpu : !Ref CPUReservation
167
177
Memory : !Ref MemoryLimit
168
178
MemoryReservation : !Ref MemoryReservation
179
+ HealthCheck :
180
+ Command :
181
+ - " CMD-SHELL"
182
+ - " wget --quiet --tries=1 --spider --timeout=30 http://localhost:8080/actuator/health || exit 1"
183
+ StartPeriod : !Ref HealthCheckGracePeriodSeconds
184
+ Timeout : 30
169
185
PortMappings :
170
186
- ContainerPort : 8080
171
187
LogConfiguration :
0 commit comments