Skip to content

Instantly share code, notes, and snippets.

@jhoblitt
Last active November 16, 2018 01:23
Show Gist options
  • Save jhoblitt/07b3b04661501a3a2d1fbe1f6e6f6cc7 to your computer and use it in GitHub Desktop.
Save jhoblitt/07b3b04661501a3a2d1fbe1f6e6f6cc7 to your computer and use it in GitHub Desktop.
Upgrading aws ec2 instances from c4.* -> c5.*; converting from vif -> ena network driver
instance_id=<foo>
aws ec2 stop-instances --instance-ids $instance_id
#aws ec2 modify-instance-attribute --instance-id $instance_id --instance-type c4.xlarge
aws ec2 modify-instance-attribute --instance-id $instance_id --instance-type c5.xlarge
aws ec2 modify-instance-attribute --instance-id $instance_id --ena-support
aws ec2 start-instances --instance-ids $instance_id
aws ec2 describe-instances --filters "Name=tag:env_name,Values=jenkins-prod" --query 'Reservations[*].Instances[*].InstanceId,ImageId,Tags[?Key==`Name`].Value]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment