Skip to content

Commit a3fb8e5

Browse files
committed
revamp autoscaling
1 parent ef083ba commit a3fb8e5

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

src/content/docs/aws/services/auto-scaling.md renamed to src/content/docs/aws/services/autoscaling.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Auto Scaling"
3-
linkTitle: "Auto Scaling"
4-
description: Get started with Auto Scaling" on LocalStack
3+
description: Get started with Auto Scaling on LocalStack
54
tags: ["Base"]
65
---
76

@@ -11,7 +10,7 @@ Auto Scaling helps you maintain application availability and allows you to autom
1110
You can use Auto Scaling to ensure that you are running your desired number of instances.
1211

1312
LocalStack allows you to use the Auto Scaling APIs locally to create and manage Auto Scaling groups locally.
14-
The supported APIs are available on our [API coverage page]({{< ref "coverage_autoscaling" >}}), which provides information on the extent of Auto Scaling's integration with LocalStack.
13+
The supported APIs are available on our [API coverage page](), which provides information on the extent of Auto Scaling's integration with LocalStack.
1514

1615
## Getting started
1716

@@ -25,12 +24,12 @@ We will demonstrate how you can create a launch template, an Auto Scaling group,
2524
You can create a launch template that defines the launch configuration for the instances in the Auto Scaling group using the [`CreateLaunchTemplate`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html) API.
2625
Run the following command to create a launch template:
2726

28-
{{< command >}}
29-
$ awslocal ec2 create-launch-template \
27+
```bash
28+
awslocal ec2 create-launch-template \
3029
--launch-template-name my-template-for-auto-scaling \
3130
--version-description version1 \
3231
--launch-template-data '{"ImageId":"ami-ff0fea8310f3","InstanceType":"t2.micro"}'
33-
{{< /command >}}
32+
```
3433

3534
The following output is displayed:
3635

@@ -53,30 +52,30 @@ The following output is displayed:
5352
Before creating an Auto Scaling group, you need to fetch the subnet ID.
5453
Run the following command to describe the subnets:
5554

56-
{{< command >}}
57-
$ awslocal ec2 describe-subnets --output text --query Subnets[0].SubnetId
58-
{{< /command >}}
55+
```bash
56+
awslocal ec2 describe-subnets --output text --query Subnets[0].SubnetId
57+
```
5958

6059
Copy the subnet ID from the output and use it to create the Auto Scaling group.
6160
Run the following command to create an Auto Scaling group using the [`CreateAutoScalingGroup`](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CreateAutoScalingGroup.html) API:
6261

63-
{{< command >}}
64-
$ awslocal autoscaling create-auto-scaling-group \
62+
```bash
63+
awslocal autoscaling create-auto-scaling-group \
6564
--auto-scaling-group-name my-asg \
6665
--launch-template LaunchTemplateId=lt-5ccdf1a84f178ba44 \
6766
--min-size 1 \
6867
--max-size 5 \
6968
--vpc-zone-identifier 'subnet-d4d16268'
70-
{{< /command >}}
69+
```
7170

7271
### Describe the Auto Scaling group
7372

7473
You can describe the Auto Scaling group using the [`DescribeAutoScalingGroups`](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAutoScalingGroups.html) API.
7574
Run the following command to describe the Auto Scaling group:
7675

77-
{{< command >}}
78-
$ awslocal autoscaling describe-auto-scaling-groups
79-
{{< /command >}}
76+
```bash
77+
awslocal autoscaling describe-auto-scaling-groups
78+
```
8079

8180
The following output is displayed:
8281

@@ -119,23 +118,23 @@ You can attach an instance to the Auto Scaling group using the [`AttachInstances
119118
Before that, create an EC2 instance using the [`RunInstances`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) API.
120119
Run the following command to create an EC2 instance locally:
121120

122-
{{< command >}}
123-
$ awslocal ec2 run-instances \
121+
```bash
122+
awslocal ec2 run-instances \
124123
--image-id ami-ff0fea8310f3 --count 1
125-
{{< /command >}}
124+
```
126125

127126
Fetch the instance ID from the output and use it to attach the instance to the Auto Scaling group.
128127
Run the following command to attach the instance to the Auto Scaling group:
129128

130-
{{< command >}}
131-
$ awslocal autoscaling attach-instances \
129+
```bash
130+
awslocal autoscaling attach-instances \
132131
--instance-ids i-0d678c4ecf6018dde \
133132
--auto-scaling-group-name my-asg
134-
{{< /command >}}
133+
```
135134

136135
Replace `i-0d678c4ecf6018dde` with the instance ID that you fetched from the output.
137136

138137
## Current Limitations
139138

140-
LocalStack does not support the `docker`/`libvirt` [VM manager for EC2]({{< ref "/user-guide/aws/ec2/#vm-managers" >}}).
139+
LocalStack does not support the `docker`/`libvirt` [VM manager for EC2](/aws/services/ec2/#vm-managers).
141140
It only works with the `mock` VM manager.

0 commit comments

Comments
 (0)