Skip to content

Commit 36cbea8

Browse files
committed
revamp fis
1 parent a8926de commit 36cbea8

File tree

1 file changed

+35
-31
lines changed
  • src/content/docs/aws/services

1 file changed

+35
-31
lines changed

src/content/docs/aws/services/fis.md

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
2-
title: "Fault Injection Service (FIS)"
3-
linkTitle: "Fault Injection Service (FIS)"
4-
description: >
5-
Get started with Fault Injection Service (FIS) on LocalStack
2+
title: Fault Injection Service (FIS)
3+
description: Get started with Fault Injection Service (FIS) on LocalStack
64
tags: ["Ultimate"]
75
---
86

@@ -13,11 +11,11 @@ FIS simulates faults such as resource unavailability and service errors to asses
1311
The full list of such possible fault injections is available in the [AWS docs](https://docs.aws.amazon.com/fis/latest/userguide/fis-actions-reference.html).
1412

1513
LocalStack allows you to use the FIS APIs in your local environment to introduce faults in other services, in order to check how your setup behaves when parts of it stop working locally.
16-
The supported APIs are available on our [API coverage page]({{< ref "coverage_fis" >}}), which provides information on the extent of FIS API's integration with LocalStack.
14+
The supported APIs are available on our [API coverage page](), which provides information on the extent of FIS API's integration with LocalStack.
1715

18-
{{< callout "tip" >}}
19-
LocalStack also features its own powerful chaos engineering tool, [Chaos API]({{< ref "chaos-api" >}}).
20-
{{< /callout >}}
16+
:::note
17+
LocalStack also features its own powerful chaos engineering tool, [Chaos API](/aws/capabilities/chaos-engineering/chaos-api).
18+
:::
2119

2220
## Concepts
2321

@@ -30,10 +28,10 @@ FIS defines the following elements:
3028
Together this is termed as an Experiment.
3129
After the designated time, running experiments restore systems to their original state and cease introducing faults.
3230

33-
{{< callout "note" >}}
31+
:::note
3432
FIS experiment emulation is part of LocalStack Enterprise.
3533
If you'd like to try it out, please [contact us](https://www.localstack.cloud/demo).
36-
{{< /callout >}}
34+
:::
3735

3836
FIS actions can be categorized into two main types:
3937

@@ -89,9 +87,9 @@ Nonetheless, they are obligatory fields according to AWS specifications and must
8987

9088
Run the following command to create an FIS experiment template using the configuration file we just created:
9189

92-
{{< command >}}
93-
$ awslocal fis create-experiment-template --cli-input-json file://create-experiment.json
94-
{{< /command >}}
90+
```bash
91+
awslocal fis create-experiment-template --cli-input-json file://create-experiment.json
92+
```
9593

9694
The following output would be retrieved:
9795

@@ -132,24 +130,27 @@ The following output would be retrieved:
132130

133131
You can list all the templates you have created using the [`ListExperimentTemplates`](https://docs.aws.amazon.com/fis/latest/APIReference/API_ListExperimentTemplates.html):
134132

135-
{{< command >}}
136-
$ awslocal fis list-experiment-templates
137-
{{< /command >}}
133+
```bash
134+
awslocal fis list-experiment-templates
135+
```
138136

139137
### Starting the experiment
140138

141139
Now let us start an EC2 instance that will match the criteria we specified in the experiment template.
142140

143-
{{< command >}}
144-
$ awslocal ec2 run-instances --image-id ami-024f768332f0 --count 1 --tag-specifications '{"ResourceType": "instance", "Tags": [{"Key": "foo", "Value": "bar"}]}'
145-
{{< /command >}}
141+
```bash
142+
awslocal ec2 run-instances \
143+
--image-id ami-024f768332f0 \
144+
--count 1 \
145+
--tag-specifications '{"ResourceType": "instance", "Tags": [{"Key": "foo", "Value": "bar"}]}'
146+
```
146147

147148
You can start the experiment using the [`StartExperiment`](https://docs.aws.amazon.com/fis/latest/APIReference/API_StartExperiment.html).
148149
Run the following command and specify the ID of the experiment template you created earlier:
149150

150-
{{< command >}}
151-
$ awslocal fis start-experiment --experiment-template-id ad16589a-4a91-4aee-88df-c33446605882
152-
{{< /command >}}
151+
```bash
152+
awslocal fis start-experiment --experiment-template-id ad16589a-4a91-4aee-88df-c33446605882
153+
```
153154

154155
The following output would be retrieved:
155156

@@ -194,25 +195,28 @@ The following output would be retrieved:
194195
You can use the [`ListExperiments`](https://docs.aws.amazon.com/fis/latest/APIReference/API_ListExperiments.html) to check the status of your experiment.
195196
Run the following command:
196197

197-
{{< command >}}
198-
$ awslocal fis list-experiments
199-
{{< /command >}}
198+
```bash
199+
awslocal fis list-experiments
200+
```
200201

201202
You can fetch the details of your experiment using the [`GetExperiment`](https://docs.aws.amazon.com/fis/latest/APIReference/API_GetExperiment.html) API.
202203
Run the following command and specify the ID of the experiment you created earlier:
203204

204-
{{< command >}}
205-
$ awslocal fis get-experiment --id efee7c02-8733-4d7c-9628-1b60bbec9759
206-
{{< /command >}}
205+
```bash
206+
awslocal fis get-experiment --id efee7c02-8733-4d7c-9628-1b60bbec9759
207+
```
207208

208209
### Verifying the outcome
209210

210211
You can now test that the experiment is working as expected by trying to obtain the state of the EC2 instance using [`DescribeInstanceStatus`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceStatus.html).
211212
Run the following command:
212213

213-
{{< command >}}
214-
$ awslocal ec2 describe-instance-status --instance-ids i-3c40b52ab72f99c63 --output json --query InstanceStatuses[0].InstanceState
215-
{{< /command >}}
214+
```bash
215+
awslocal ec2 describe-instance-status \
216+
--instance-ids i-3c40b52ab72f99c63 \
217+
--output json \
218+
--query InstanceStatuses[0].InstanceState
219+
```
216220

217221
If everything happened as expected, the following output would be retrieved:
218222

0 commit comments

Comments
 (0)