LocalStack Outages Extension
=============================================
> [!NOTE]
> LocalStack Outages Extension is no longer supported.
> Please migrate to LocalStack Chaos API.
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:
```bash
localstack auth login
```
You can then install this extension using the following command:
```bash
localstack extensions install localstack-extension-outages
```
## Configuration
The extension is configured using an API endpoint.
The configuration consists of a list of rules which are greedily evaluated.
Each rule consists of two attributes: service name and region.
You may use the `*` wildcard in either of these attributes.
Start an outage for a list of specified service/region pairs using a POST request like follows:
```bash
curl --location --request POST 'http://outages.localhost.localstack.cloud:4566/outages' \
--header 'Content-Type: application/json' \
--data '
[
{
"service": "kms",
"region": "us-east-1"
},
{
"service": "s3",
"region": "us-*"
},
{
"service": "lambda",
"region": "*"
}
]'
```
When activated, API calls to affected services and regions will return a HTTP 503 Service Unavailable error.
In the above example, following are affected:
- KMS in `us-east-1`
- S3 in all US regions (`us-east-1`, `us-east-2`, `us-west-1`, `us-west-2`, `us-gov-east-1` and `us-gov-west-1`)
- Lambda in all regions
Outages may be stopped by using empty list in the configuration.
The following request will clear the current configuration:
```bash
curl --location --request POST 'http://outages.localhost.localstack.cloud:4566/outages' \
--header 'Content-Type: application/json' \
--data '[]'
```
To retrieve the current configuration, make the following GET call:
```bash
curl --location --request GET 'http://outages.localhost.localstack.cloud:4566/outages'
```
To add a new service/region rule pair to the configuration, make a PATCH call as follows:
```bash
curl --location --request PATCH 'http://outages.localhost.localstack.cloud:4566/outages' \
--header 'Content-Type: application/json' \
--data '[{"service": "transcribe", "region": "us-west-1"}]'
```
To remove a service/region rule pair from the configuration, make a DELETE call as follows:
```bash
curl --location --request DELETE 'http://outages.localhost.localstack.cloud:4566/outages' \
--header 'Content-Type: application/json' \
--data '[{"service": "transcribe", "region": "us-west-1"}]'
```
## License
(c) 2024 LocalStack
Raw data
{
"_id": null,
"home_page": "https://localstack.cloud",
"name": "localstack-extension-outages",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "LocalStack",
"author_email": "support@localstack.cloud",
"download_url": "https://files.pythonhosted.org/packages/4f/a6/dd54c71f9c3d557d66bc57b37adcb313d38b2c2ac2f1bfc41bf524ca583c/localstack-extension-outages-0.6.0.tar.gz",
"platform": null,
"description": "LocalStack Outages Extension\n=============================================\n\n> [!NOTE]\n> LocalStack Outages Extension is no longer supported.\n> Please migrate to LocalStack Chaos API.\n\nThis LocalStack extension can simulate outages for any AWS region or service.\n\n## Prerequisites\n\n- LocalStack Pro\n- Docker\n- Python\n\n## Installation\n\nBefore installing the extension, make sure you're logged into LocalStack. If not, log in using the following command:\n\n```bash\nlocalstack auth login\n```\n\nYou can then install this extension using the following command:\n\n```bash\nlocalstack extensions install localstack-extension-outages\n```\n\n## Configuration\n\nThe extension is configured using an API endpoint.\nThe configuration consists of a list of rules which are greedily evaluated.\nEach rule consists of two attributes: service name and region.\nYou may use the `*` wildcard in either of these attributes.\n\nStart an outage for a list of specified service/region pairs using a POST request like follows:\n\n```bash\ncurl --location --request POST 'http://outages.localhost.localstack.cloud:4566/outages' \\\n --header 'Content-Type: application/json' \\\n --data '\n [\n {\n \"service\": \"kms\",\n \"region\": \"us-east-1\"\n },\n {\n \"service\": \"s3\",\n \"region\": \"us-*\"\n }, \n {\n \"service\": \"lambda\",\n \"region\": \"*\"\n }\n ]'\n```\n\nWhen activated, API calls to affected services and regions will return a HTTP 503 Service Unavailable error.\n\nIn the above example, following are affected:\n- KMS in `us-east-1`\n- S3 in all US regions (`us-east-1`, `us-east-2`, `us-west-1`, `us-west-2`, `us-gov-east-1` and `us-gov-west-1`)\n- Lambda in all regions\n\nOutages may be stopped by using empty list in the configuration.\nThe following request will clear the current configuration:\n\n```bash\ncurl --location --request POST 'http://outages.localhost.localstack.cloud:4566/outages' \\\n --header 'Content-Type: application/json' \\\n --data '[]'\n```\n\nTo retrieve the current configuration, make the following GET call:\n\n```bash\ncurl --location --request GET 'http://outages.localhost.localstack.cloud:4566/outages'\n```\n\nTo add a new service/region rule pair to the configuration, make a PATCH call as follows:\n\n```bash\ncurl --location --request PATCH 'http://outages.localhost.localstack.cloud:4566/outages' \\\n --header 'Content-Type: application/json' \\\n --data '[{\"service\": \"transcribe\", \"region\": \"us-west-1\"}]'\n```\n\nTo remove a service/region rule pair from the configuration, make a DELETE call as follows:\n\n```bash\ncurl --location --request DELETE 'http://outages.localhost.localstack.cloud:4566/outages' \\\n --header 'Content-Type: application/json' \\\n --data '[{\"service\": \"transcribe\", \"region\": \"us-west-1\"}]'\n```\n\n## License\n\n(c) 2024 LocalStack\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "LocalStack Extension: Outages",
"version": "0.6.0",
"project_urls": {
"Homepage": "https://localstack.cloud"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4fa6dd54c71f9c3d557d66bc57b37adcb313d38b2c2ac2f1bfc41bf524ca583c",
"md5": "48eb2c835de1367b99cd01e2cfcc1142",
"sha256": "f44c210630a9e5fd182f8ce1ed97f7c508ea555bca77bcf16f12d9e8918f2075"
},
"downloads": -1,
"filename": "localstack-extension-outages-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "48eb2c835de1367b99cd01e2cfcc1142",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4183,
"upload_time": "2024-07-26T11:21:30",
"upload_time_iso_8601": "2024-07-26T11:21:30.089831Z",
"url": "https://files.pythonhosted.org/packages/4f/a6/dd54c71f9c3d557d66bc57b37adcb313d38b2c2ac2f1bfc41bf524ca583c/localstack-extension-outages-0.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-26 11:21:30",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "localstack-extension-outages"
}