Belajar Sendiri

Commands

aws ecs run-task --cluster

aws ecs run-task --cluster <cluster> --launch-type FARGATE --task-definition <family:rev> --network-configuration <config>

Risk: Careful

What it does

Starts a task once, for example on Fargate.

When to use it

For one-off jobs and tests. Fargate bills each second it runs; stop it when done.

Example

$ aws ecs run-task --cluster kedai --launch-type FARGATE --task-definition kedai-web:1 --network-configuration "awsvpcConfiguration={subnets=[subnet-0e99b93155EXAMPLE],securityGroups=[sg-903004f8],assignPublicIp=ENABLED}"

One small task in your row, behind your guard.