Skip to content

Instantly share code, notes, and snippets.

@mmehta-10
Created July 14, 2019 18:52
Show Gist options
  • Save mmehta-10/243eac2e9f1cc48b4a484a2ddba1e7fa to your computer and use it in GitHub Desktop.
Save mmehta-10/243eac2e9f1cc48b4a484a2ddba1e7fa to your computer and use it in GitHub Desktop.

ECS/FARGATE

describe-services
[--cluster <value>]
--services <value>
[--include <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
clustername=
servicename=
aws ecs describe-services --cluster $clustername --services $servicename

Change task-def for a service:

clustername=
servicename=
taskdef=
aws ecs update-service --cluster $clustername --service $servicename --task-definition $taskdef:1

CLOUDFORMATION

Parameters used below are from a Selenium Grid stack -


cd %userprofile%\Downloads\logs
STACKNAME=
TEMPLATE_PATH=
VPC=
PublicSubnetOne=
PublicSubnetTwo=
aws cloudformation update-stack --stack-name $STACKNAME --template-url file://$TEMPLATE_PATH.json --parameters ^ 
ParameterKey=VPC,ParameterValue=$VPC ^
ParameterKey=PublicSubnetOne,ParameterValue=$PublicSubnetOne ^
ParameterKey=PublicSubnetTwo,ParameterValue=$PublicSubnetTwo ^
ParameterKey=ContainerCpu,ParameterValue=4096 ^
ParameterKey=ContainerMemory,ParameterValue=16384 ^
ParameterKey=Path,ParameterValue=* ^
ParameterKey=SeleniumImageVersion,ParameterValue=3.141.59 ^
ParameterKey=Priority,ParameterValue=1 ^
ParameterKey=Role,ParameterValue=*
STACKNAME
aws cloudformation describe-stacks --stack-name $STACKNAME
aws cloudformation get-template --stack-name $STACKNAME > CFT.json
aws cloudformation validate-template --template-body file://<path>.template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment