Skip to content

Instantly share code, notes, and snippets.

@understeer
Created May 17, 2016 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save understeer/db3e80b11cd3012a7cb223764ce77ad2 to your computer and use it in GitHub Desktop.
Save understeer/db3e80b11cd3012a7cb223764ce77ad2 to your computer and use it in GitHub Desktop.
プライベートIPアドレスを連番でインスタンスを起動する
#!/bin/sh
INSTANCE_TYPE=c4.8xlarge
for IP in `seq 101 157`
do
aws ec2 run-instances \
--region ap-northeast-1 \
--image-id ami-xxxxxx \
--security-group-ids sg-xxxxx \
--key-name test20140204 \
--instance-type $INSTANCE_TYPE \
--placement GroupName="HPC" \
--subnet-id subnet-xxxxx \
--private-ip-address 172.31.1.$IP
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment