primus.command_worker.adapters.ecs_task_protection module
ECS agent endpoint adapter for task scale-in protection.
- class primus.command_worker.adapters.ecs_task_protection.EcsAgentTaskScaleInProtection(agent_uri: str, *, expires_in_minutes: int = 2880)
Bases:
objectProtect the current ECS task through the injected agent endpoint.
ECS_AGENT_URIis available only inside ECS. The agent authenticates these calls with the task role, so no static AWS credentials or SDK are required in the portable worker.- __init__(agent_uri: str, *, expires_in_minutes: int = 2880) None
- clear() bool
- enable() bool