Skip to content

Commit 8116298

Browse files
committed
Merge branch 'EronHennessey-doc_updates' into develop
* EronHennessey-doc_updates: many more example updates from the aws doc team Merged with doc team repository.
2 parents 3ca93fc + 18687e4 commit 8116298

113 files changed

Lines changed: 2828 additions & 348 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**To attach an instance to an Auto Scaling group**
2+
3+
The following ``attach-instances`` command attaches an instance to an Auto Scaling group::
4+
5+
aws autoscaling attach-instances --instance-ids i-93633f9b --auto-scaling-group-name basic-auto-scaling-group
6+
7+
For more information, see `Attach Amazon Instances to Your Auto Scaling Group`_ in the *Auto Scaling Developer Guide*.
8+
9+
.. _`Attach Amazon Instances to Your Auto Scaling Group`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/attach-instance-asg.html
10+
Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
**To launch an Auto Scaling group**
22

3-
The following ``create-auto-scaling-group`` command launches an Auto Scaling group::
3+
The following ``create-auto-scaling-group`` command launches an Auto Scaling group in a VPC::
44

5-
aws autoscaling create-auto-scaling-group --auto-scaling-group-name my-test-windows-asg --launch-configuration-name my-test-windows-lc --min-size 0 --max-size 1 --desired-capacity 1 --availability-zones us-west-2c
5+
aws autoscaling create-auto-scaling-group --auto-scaling-group-name basic-auto-scaling-group --launch-configuration-name basic-launch-config --min-size 1 --max-size 3 --vpc-zone-identifier subnet-41767929c
6+
7+
The following ``create-auto-scaling-group`` command launches an Auto Scaling group and configures it to use Elastic Load Balancing::
8+
9+
aws autoscaling create-auto-scaling-group --auto-scaling-group-name extended-auto-scaling-group-2 --launch-configuration-name basic-launch-config-3 --load-balancer-names "sample-lb" --health-check-type ELB --health-check-grace-period 120
10+
11+
The following ``create-auto-scaling-group`` command launches an Auto Scaling group. It specifies Availability Zones (using the ``availability-zones`` parameter) instead of subnets. It also launches any instances into a placement group and sets the termination policy to terminate the oldest instances first::
12+
13+
aws autoscaling create-auto-scaling-group --auto-scaling-group-name extended-auto-scaling-group-2 --launch-configuration-name basic-launch-config-3 --min-size 1 --max-size 3 --desired-capacity 2 --default-cooldown 600 --placement-group sample-placement-group --termination-policies "OldestInstance" --availability-zones us-west-2c
14+
15+
The following ``create-auto-scaling-group`` command launches an Auto Scaling group and assigns a tag to instances in the group::
16+
17+
aws autoscaling create-auto-scaling-group --auto-scaling-group-name tags-auto-scaling-group --instance-id i-22c99e2a --min-size 1 --max-size 3 --vpc-zone-identifier subnet-41767929 --tags ResourceId=tags-auto-scaling-group,ResourceType=auto-scaling-group,Key=Role,Value=WebServer
618

719
For more information, see `Basic Auto Scaling Configuration`_ in the *Auto Scaling Developer Guide*.
820

921
.. _`Basic Auto Scaling Configuration`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/US_BasicSetup.html
22+

awscli/examples/autoscaling/create-launch-configuration.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ The following example uses the ``create-launch-configuration`` command to create
44

55
aws autoscaling create-launch-configuration --launch-configuration-name my-test-lc --image-id ami-c6169af6 --instance-type m1.medium
66

7+
The following example uses the ``create-launch-configuration`` command to create a launch configuration using Spot Instances::
8+
9+
aws autoscaling create-launch-configuration --launch-configuration-name my-test-lc --image-id ami-c6169af6 --instance-type m1.medium --spot-price "0.50"
10+
11+
The following example creates a launch configuration and assigns it a key pair and bootstrapping script::
12+
13+
aws autoscaling create-launch-configuration --launch-configuration-name detailed-launch-config --key-name qwikLABS-L238-20080 --image-id ami-c6169af6 --instance-type m1.small --user-data file://labuserdata.txt
14+
15+
The following example creates a launch configuration based on an existing instance. In addition, it also specifies launch configuration attributes such as a security group, tenancy, Amazon EBS optimization, and bootstrapping script::
16+
17+
aws autoscaling create-launch-configuration --launch-configuration-name detailed-launch-config --key-name qwikLABS-L238-20080 --instance-id i-7e13c876 --security-groups sg-eb2af88e --instance-type m1.small --user-data file://labuserdata.txt --instance-monitoring Enabled=true --no-ebs-optimized --no-associate-public-ip-address --placement-tenancy dedicated --iam-instance-profile "autoscalingrole"
18+
19+
Add the following parameter to your ``create-launch-configuration`` command to add an Amazon EBS volume with the device name ``/dev/sdh`` and a volume size of 100.
20+
21+
Command::
22+
23+
--block-device-mappings "[{\"DeviceName\": \"/dev/sdh\",\"Ebs\":{\"VolumeSize\":100}}]"
24+
25+
Add the following parameter to your ``create-launch-configuration`` command to add ``ephemeral1`` as an instance store volume with the device name ``/dev/sdc``.
26+
27+
Command::
28+
29+
--block-device-mappings "[{\"DeviceName\": \"/dev/sdc\",\"VirtualName\":\"ephemeral1\"}]"
30+
31+
Add the following parameter to your ``create-launch-configuration`` command to omit a device included on the instance (for example, ``/dev/sdf``).
32+
33+
Command::
34+
35+
--block-device-mappings "[{\"DeviceName\": \"/dev/sdf\",\"NoDevice\":\"\"}]"
36+
737
For more information, see `Basic Auto Scaling Configuration`_ in the *Auto Scaling Developer Guide*.
838

939
.. _`Basic Auto Scaling Configuration`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/US_BasicSetup.html
40+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**To create or update tags for an Auto Scaling group**
2+
3+
The following ``create-or-update-tags`` command attaches two tags to an Auto Scaling group::
4+
5+
aws autoscaling create-or-update-tags --tags ResourceId=tags-auto-scaling-group,ResourceType=auto-scaling-group,Key=Role,Value=WebServer,PropagateAtLaunch=true ResourceId=tags-auto-scaling-group,ResourceType=auto-scaling-group,Key=Dept,Value=Research,PropagateAtLaunch=true
6+
7+
For more information, see `Add, Modify, or Remove Auto Scaling Group Tags`_ in the *Auto Scaling Developer Guide*.
8+
9+
.. _`Add, Modify, or Remove Auto Scaling Group Tags`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASTagging.html
10+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
**To delete an Auto Scaling group**
2+
3+
The following ``delete-auto-scaling-group`` command deletes an Auto Scaling group::
4+
5+
aws autoscaling delete-auto-scaling-group --auto-scaling-group-name delete-me-auto-scaling-group
6+
7+
If you want to delete the Auto Scaling group without waiting for the instances in the group to terminate, use the ``--force-delete`` parameter::
8+
9+
aws autoscaling delete-auto-scaling-group --auto-scaling-group-name delete-me-auto-scaling-group --force-delete
10+
11+
For more information, see `Shut Down Your Auto Scaling Process`_ in the *Auto Scaling Developer Guide*.
12+
13+
.. _`Shut Down Your Auto Scaling Process`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-process-shutdown.html
14+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**To delete an Auto Scaling launch configuration**
2+
3+
The following ``delete-launch-configuration`` command deletes an Auto Scaling launch configuration::
4+
5+
aws autoscaling delete-launch-configuration --launch-configuration-name test
6+
7+
For more information, see `Shut Down Your Auto Scaling Process`_ in the *Auto Scaling Developer Guide*.
8+
9+
.. _`Shut Down Your Auto Scaling Process`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-process-shutdown.html
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**To delete an Auto Scaling notification**
2+
3+
The following ``delete-notification-configuration`` command deletes a notification from an Auto Scaling group::
4+
5+
aws autoscaling delete-notification-configuration --auto-scaling-group-name basic-auto-scaling-group --topic-arn arn:aws:sns:us-west-2:896650972448:second-test-topic
6+
7+
For more information, see the `Delete Notification Configuration`_ section in the Getting Notifications When Your Auto Scaling Group Changes topic, in the *Auto Scaling Developer Guide*.
8+
9+
.. _`Delete Notification Configuration`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASGettingNotifications.html#delete-settingupnotifications
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**To delete an Auto Scaling policy**
2+
3+
The following ``delete-policy`` command deletes an Auto Scaling policy::
4+
5+
aws autoscaling delete-policy --auto-scaling-group-name basic-auto-scaling-group --policy-name ScaleIn
6+
7+
For more information, see `Dynamic Scaling`_ in the *Auto Scaling Developer Guide*.
8+
9+
.. _`Dynamic Scaling`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**To delete a scheduled action from an Auto Scaling group**
2+
3+
The following ``delete-scheduled-action`` command deletes a scheduled action from an Auto Scaling group::
4+
5+
aws autoscaling delete-scheduled-action --auto-scaling-group-name basic-auto-scaling-group --scheduled-action-name sample-scheduled-action
6+
7+
For more information, see `Scheduled Scaling`_ in the *Auto Scaling Developer Guide*.
8+
9+
.. _`Scheduled Scaling`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/schedule_time.html
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
**To delete a tag from an Auto Scaling group**
2+
3+
The following ``delete-tags`` command deletes a tag from an Auto Scaling group::
4+
5+
aws autoscaling delete-tags --tags ResourceId=tags-auto-scaling-group,ResourceType=auto-scaling-group,Key=Dept,Value=Research
6+
7+
For more information, see `Add, Modify, or Remove Auto Scaling Group Tags`_ in the *Auto Scaling Developer Guide*.
8+
9+
.. _`Add, Modify, or Remove Auto Scaling Group Tags`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASTagging.html
10+

0 commit comments

Comments
 (0)