Created
October 23, 2019 17:11
-
-
Save dfenjves/385759a1bbe7aced3e9f0301e676e4ab to your computer and use it in GitHub Desktop.
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
IFS=, | |
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; } | |
while read student_username | |
do | |
aws iam create-user --user-name $student_username | |
aws iam add-user-to-group --group-name students --user-name $student_username | |
aws iam create-login-profile --user-name $student_username --password temporarypassword123! --password-reset-required | |
sleep 10s | |
aws cloud9 create-environment-ec2 --name $student_username --instance-type t2.micro --owner-arn arn:aws:iam::1234567890:user/$student_username | |
done < $INPUT | |
IFS=$OLDIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment