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: object

Protect the current ECS task through the injected agent endpoint.

ECS_AGENT_URI is 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