adapted for aws ec2