Skip to content
Permalink
202109
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
@mchyzer
Latest commit f65cabe Jun 8, 2021 History
1 contributor

Users who have contributed to this file

19 lines (14 sloc) 794 Bytes
ami: amzn2-ami-hvm-2.0.20190508-x86_64-gp2
t3a-large
network ends in 688
subnet ends in 4a6
auto assign public ip
storage 30gig
security group: gte-training
tag env training
user data script from https://github.internet2.edu/docker/grouper_training/raw/202106/internal/userdata.sh
ssh -i gte-training-master.pem ec2-user@3.136.154.33
instance i-043829afce57f6da6
3.21.41.203
pip install awscli --user
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | select(.State.Name!="terminated") | select((.Tags[]|select(.Key=="env")|.Value) =="training")] | .[] | .InstanceId' | xargs -n 1 -I{} aws ec2 get-console-output --instance-id {} | fmt | grep student | awk -F\\ '{print $1}' | awk -F , '{print $1 "\t" $2 "\t" $3 "\t\t\tssh -L 8443:localhost:8443 -l student"$1}'