Skip to content

Instantly share code, notes, and snippets.

@Reimerei
Last active November 17, 2016 13:10
Show Gist options
  • Save Reimerei/b20268f31becdd8f649c932022d6e430 to your computer and use it in GitHub Desktop.
Save Reimerei/b20268f31becdd8f649c932022d6e430 to your computer and use it in GitHub Desktop.
#!/bin/bash
name=$1
cluster=$2
td_json=$(aws ecs describe-task-definition --task-definition ${cluster}-${name} | jq 'map({family, networkMode, containerDefinitions, volumes})' | jq '.[0]')
aws ecs register-task-definition --cli-input-json $td_json
aws ecs update-service --service ${cluster}-${name} --task-definition ${cluster}-${name} --region eu-west-1 --cluster ${cluster}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment