AWS autoscaling: Auto Scaling create-launch-configuration examples: wording, user data, links
Summary
Editorial rewrite of the create-launch-configuration CLI examples: standardized intro sentences, added the contents of myuserdata.txt (a bash bootstrap script), replaced a placeholder instance ID, and updated cross-reference links to EC2 User Guide block device/instance store topics.
Security assessment
The only substantive addition is a sample user data bootstrap script (yum update/install httpd) plus prose and link cleanups; no vulnerability, credential, IAM, or encryption guidance is introduced or fixed.
Evidence
+ yum update -y
Diff
diff --git a/autoscaling/ec2/userguide/example_auto-scaling_CreateLaunchConfiguration_section.md b/autoscaling/ec2/userguide/example_auto-scaling_CreateLaunchConfiguration_section.md index 14f804a..35f7cad 100644 --- a//autoscaling/ec2/userguide/example_auto-scaling_CreateLaunchConfiguration_section.md +++ b//autoscaling/ec2/userguide/example_auto-scaling_CreateLaunchConfiguration_section.md @@ -19 +19 @@ CLI -This example creates a simple launch configuration. +The following `create-launch-configuration` example creates a simple launch configuration. @@ -34 +34 @@ For more information, see [Creating a launch configuration](https://docs.aws.ama -This example creates a launch configuration with a security group, a key pair, and a bootstrapping script contained in the user data. +The following `create-launch-configuration` example creates a launch configuration with a security group, a key pair, and a bootstrapping script contained in the user data. @@ -45,0 +46,9 @@ This example creates a launch configuration with a security group, a key pair, a +Contents of `myuserdata.txt`: + + + #!/bin/bash + yum update -y + yum install -y httpd + systemctl start httpd + systemctl enable httpd + @@ -52 +61 @@ For more information, see [Creating a launch configuration](https://docs.aws.ama -This example creates a launch configuration with the instance profile name of an IAM role. +The following `create-launch-configuration` example creates a launch configuration with the instance profile name of an IAM role. @@ -68 +77 @@ For more information, see [IAM role for applications that run on Amazon EC2 inst -This example creates a launch configuration with EC2 detailed monitoring enabled, which sends EC2 metrics to CloudWatch in 1-minute periods. +The following `create-launch-configuration` example creates a launch configuration with EC2 detailed monitoring enabled, which sends EC2 metrics to CloudWatch in 1-minute periods. @@ -84 +93 @@ For more information, see [Configuring monitoring for Auto Scaling instances](ht -This example creates a launch configuration that uses Spot Instances as the only purchase option. +The following `create-launch-configuration` example creates a launch configuration that uses Spot Instances as the only purchase option. @@ -100 +109 @@ For more information, see [Requesting Spot Instances](https://docs.aws.amazon.co -This example creates a launch configuration based on the attributes of an existing instance. It overrides the placement tenancy and whether a public IP address is set by including the `--placement-tenancy` and `--no-associate-public-ip-address` options. +The following `create-launch-configuration` example creates a launch configuration based on the attributes of an existing instance. It overrides the placement tenancy and whether a public IP address is set by including the `--placement-tenancy` and `--no-associate-public-ip-address` options. @@ -105 +114 @@ This example creates a launch configuration based on the attributes of an existi - --instance-id i-0123a456700123456 \ + --instance-id i-1234567890abcdef0 \ @@ -117 +126 @@ For more information, see [Creating a launch configuration using an EC2 instance -This example creates a launch configuration with a block device mapping for an Amazon EBS `gp3` volume with the device name `/dev/sdh` and a volume size of 20. +The following `create-launch-configuration` example creates a launch configuration with a block device mapping for an Amazon EBS `gp3` volume with the device name `/dev/sdh` and a volume size of 20. @@ -129 +138 @@ This command produces no output. -For more information, see [EBS](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_Ebs.html) in the _Amazon EC2 Auto Scaling API Reference_. +For more information, see [Block device mappings for volumes on Amazon EC2 instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) in the _Amazon EC2 User Guide_. @@ -135 +144 @@ For information about the syntax for quoting JSON-formatted parameter values, se -This example creates a launch configuration with `ephemeral1` as an instance store volume with the device name `/dev/sdc`. +The following `create-launch-configuration` example creates a launch configuration with `ephemeral1` as an instance store volume with the device name `/dev/sdc`. @@ -147 +156 @@ This command produces no output. -For more information, see [BlockDeviceMapping](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_BlockDeviceMapping.html) in the _Amazon EC2 Auto Scaling API Reference_. +For more information, see [Instance store temporary block storage for EC2 instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html) in the _Amazon EC2 User Guide_. @@ -153 +162 @@ For information about the syntax for quoting JSON-formatted parameter values, se -This example creates a launch configuration that suppresses a block device specified by the block device mapping of the AMI (for example, `/dev/sdf`). +The following `create-launch-configuration` example creates a launch configuration that suppresses a block device specified by the block device mapping of the AMI (for example, `/dev/sdf`). @@ -165 +174 @@ This command produces no output. -For more information, see [BlockDeviceMapping](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_BlockDeviceMapping.html) in the _Amazon EC2 Auto Scaling API Reference_. +For more information, see [Block device mappings for volumes on Amazon EC2 instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) in the _Amazon EC2 User Guide_.