Created
June 27, 2018 13:20
-
-
Save Cayan/b84bb55d1f20b233eb61f21459cc4e3e to your computer and use it in GitHub Desktop.
Script to delete all ECS task definitions according to a pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run `aws ecs list-task-definitions --status active` to list all available task definitions | |
aws ecs list-task-definitions --status active | grep REPLACE_WITH_THE_NAME_OF_DEFINITION | | |
awk '{print substr($0, 1, length($0)-1)}' | xargs -I{} aws ecs deregister-task-definition --task-definition {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment