I’ve discovered that while the LocalStack Chaos API endpoints are accepting and storing fault configurations, they don’t appear to have any effect on S3 operations.
Environment
- LocalStack Pro version 4
- Docker and Docker Compose
- AWS CLI
Reproduction Repository
I’ve created a minimal reproduction repository here: GitHub - asimihsan/localstack-chaos-repro
Steps to Reproduce
- Clone the repository and follow the README instructions
- Observe that after configuring a fault for S3, operations still succeed when they should fail
Current Behavior
As shown in this output from test.sh:
Creating test bucket...
make_bucket: test-bucket
Verifying bucket exists...
2024-12-19 10:38:30 test-bucket
Configuring chaos fault for all S3 operations...
[{\"service\": \"s3\", \"probability\": 1.0}]
Verifying fault configuration...
[{\"service\": \"s3\", \"probability\": 1.0}]
Trying multiple S3 operations that should all fail:
1. Listing buckets...
2024-12-19 10:38:30 test-bucket
2. Creating another bucket...
make_bucket: test-bucket-2
3. Putting an object...
upload: ./test.txt to s3://test-bucket/test.txt
4. Getting an object...
download: s3://test-bucket/test.txt to ./test2.txt
Expected Behavior
After configuring the chaos fault, all S3 operations should fail with errors.
Additional Context
- The Chaos API endpoints work (they accept and store configuration)
- The GET endpoint confirms the configuration is stored
- But the configuration has no effect on actual S3 operations
- This has been tested with multiple S3 operations (create bucket, list buckets, put object, get object)
Docker compose logs:
localstack-1 | 2024-12-19T15:38:18.367 INFO --- [et.reactor-0] localstack.request.http : POST /_localstack/chaos/faults => 200
localstack-1 | 2024-12-19T15:38:18.382 INFO --- [et.reactor-1] localstack.request.http : GET /_localstack/chaos/faults => 200
localstack-1 | 2024-12-19T15:38:30.143 INFO --- [et.reactor-1] localstack.request.aws : AWS s3.CreateBucket => 200
localstack-1 | 2024-12-19T15:38:30.404 INFO --- [et.reactor-0] localstack.request.aws : AWS s3.ListBuckets => 200
localstack-1 | 2024-12-19T15:38:30.465 INFO --- [et.reactor-1] localstack.request.http : POST /_localstack/chaos/faults => 200
localstack-1 | 2024-12-19T15:38:30.482 INFO --- [et.reactor-0] localstack.request.http : GET /_localstack/chaos/faults => 200
localstack-1 | 2024-12-19T15:38:30.719 INFO --- [et.reactor-1] localstack.request.aws : AWS s3.ListBuckets => 200
localstack-1 | 2024-12-19T15:39:25.192 INFO --- [et.reactor-1] localstack.request.aws : AWS s3.CreateBucket => 200
localstack-1 | 2024-12-19T15:39:25.456 INFO --- [et.reactor-0] localstack.request.aws : AWS s3.ListBuckets => 200
localstack-1 | 2024-12-19T15:39:25.537 INFO --- [et.reactor-1] localstack.request.http : POST /_localstack/chaos/faults => 200
localstack-1 | 2024-12-19T15:39:25.552 INFO --- [et.reactor-0] localstack.request.http : GET /_localstack/chaos/faults => 200
localstack-1 | 2024-12-19T15:39:25.785 INFO --- [et.reactor-1] localstack.request.aws : AWS s3.ListBuckets => 200
localstack-1 | 2024-12-19T15:39:26.040 INFO --- [et.reactor-0] localstack.request.aws : AWS s3.CreateBucket => 200
localstack-1 | 2024-12-19T15:39:26.322 INFO --- [et.reactor-1] localstack.request.aws : AWS s3.PutObject => 200
localstack-1 | 2024-12-19T15:39:26.590 INFO --- [et.reactor-0] localstack.request.aws : AWS s3.HeadObject => 200
localstack-1 | 2024-12-19T15:39:26.597 INFO --- [et.reactor-1] localstack.request.aws : AWS s3.GetObject => 200
Let me know if you need any additional information to investigate this issue.