|
1 | 1 | import { Construct } from 'constructs';
|
2 | 2 | import * as ec2 from '../../../aws-ec2';
|
3 | 3 | import { FargateService, FargateTaskDefinition, HealthCheck } from '../../../aws-ecs';
|
4 |
| -import { FeatureFlags } from '../../../core'; |
| 4 | +import { FeatureFlags, Duration } from '../../../core'; |
5 | 5 | import * as cxapi from '../../../cx-api';
|
6 | 6 | import { FargateServiceBaseProps } from '../base/fargate-service-base';
|
7 | 7 | import { QueueProcessingServiceBase, QueueProcessingServiceBaseProps } from '../base/queue-processing-service-base';
|
@@ -47,6 +47,14 @@ export interface QueueProcessingFargateServiceProps extends QueueProcessingServi
|
47 | 47 | * @default false
|
48 | 48 | */
|
49 | 49 | readonly assignPublicIp?: boolean;
|
| 50 | + |
| 51 | + /** |
| 52 | + * The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy |
| 53 | + * Elastic Load Balancing target health checks after a task has first started. |
| 54 | + * |
| 55 | + * @default - defaults to 60 seconds if at least one load balancer is in-use and it is not already set |
| 56 | + */ |
| 57 | + readonly healthCheckGracePeriod?: Duration; |
50 | 58 | }
|
51 | 59 |
|
52 | 60 | /**
|
@@ -117,6 +125,7 @@ export class QueueProcessingFargateService extends QueueProcessingServiceBase {
|
117 | 125 | circuitBreaker: props.circuitBreaker,
|
118 | 126 | capacityProviderStrategies: props.capacityProviderStrategies,
|
119 | 127 | enableExecuteCommand: props.enableExecuteCommand,
|
| 128 | + healthCheckGracePeriod: props.healthCheckGracePeriod, |
120 | 129 | });
|
121 | 130 |
|
122 | 131 | this.configureAutoscalingForService(this.service);
|
|
0 commit comments