LocalStack extension that simulates region and service outages
Project description
LocalStack Outages Extension
This LocalStack extension can simulate outages for any AWS region or service.
Prerequisites
- LocalStack Pro
- Docker
- Python
Installation
Before installing the extension, make sure you're logged into LocalStack. If not, log in using the following command:
localstack login
You can then install this extension using the following command:
localstack extensions install localstack-extension-outages
Configuration
The extension can be configured using the following API endpoint.
Start an outage for specified AWS services or regions using the following PUT request.
curl --location --request PUT 'http://outages.localhost.localstack.cloud:4566/outages' \
--header 'Content-Type: application/json' \
--data '{
"services": ["kms"],
"regions": ["us-east-1"]
}'
When activated, API calls to affected services and regions will return HTTP 503 Service Unavailable errors.
Outages may be stopped by using empty lists for services
and/or regions
parameters in the request.
The following request will clear the current configuration:
curl --location --request PUT 'http://outages.localhost.localstack.cloud:4566/outages' \
--header 'Content-Type: application/json' \
--data '{
"services": [],
"regions": []
}'
To retrieve the current configuration, make the following GET call:
curl --location --request GET 'http://outages.localhost.localstack.cloud:4566/outages'
License
(c) 2023 LocalStack
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for localstack-extension-outages-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ddfb55e004586a0903dc109b1366d18bb95f4e55aaa204d049f50c243349081 |
|
MD5 | d654c5e767bcb3466c36c118517d3a64 |
|
BLAKE2b-256 | efa20e91d5cd3b09c3a8472cfcc62f724f90b7e8d4d000d076b3283fc1ea53f6 |