Skip to content

Instantly share code, notes, and snippets.

@azarzar15
Created April 1, 2021 16:47
Show Gist options
  • Save azarzar15/10651cee08ba7bff9948bd9c520eacf8 to your computer and use it in GitHub Desktop.
Save azarzar15/10651cee08ba7bff9948bd9c520eacf8 to your computer and use it in GitHub Desktop.
AWSElasticBeanstalkManagedUpdatesCustomerRolePolicy_PE
aws ec2 create-launch-template \
--launch-template-name TemplateForWebServer1 \
--version-description WebVersion1 \
--launch-template-data '{"NetworkInterfaces":[{"AssociatePublicIpAddress":true,"DeviceIndex":0,"Ipv6AddressCount":1,"SubnetId":"<REPLACE_WITH_SUBNET_ID>"}],"ImageId":"ami-05d72852800cbf29e","InstanceType":"t2.small","TagSpecifications":[{"ResourceType":"instance","Tags":[{"Key":"purpose","Value":"webserver"}]}]}' --region us-east-2
aws ec2 run-instances \
--launch-template LaunchTemplateId=<REPLACE_WITH_LT_OUTPUT>,Version=1 --iam-instance-profile '{"Arn": "<REPLACE_WITH_INSTANCE_PROFILE_ARN>"}' --region us-east-2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment