Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ECS instance with EIP auto-association and EBS volume mounting
echo ECS_CLUSTER=openvpn >> /etc/ecs/ecs.config;echo ECS_BACKEND_HOST= >> /etc/ecs/ecs.config;
mkdir -p /ecs-data/openvpn-data
echo "/dev/sdf /ecs-data/openvpn-data ext4 defaults 0 2" >> /etc/fstab
mount -a
yum install -y python36
curl -O
export PATH=/usr/local/bin:$PATH
pip install awscli
instance_id=$(curl -s
aws --region=eu-west-1 ec2 associate-address --instance-id $instance_id --allocation-id eipalloc-<id>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment