I use version 2.0.2.dev
# curl -XGET http://localhost:4566/_localstack/health
{"services": {"acm": "available", "apigateway": "available", "cloudformation": "available", "cloudwatch": "available", "config": "available", "dynamodb": "available", "dynamodbstreams": "available", "ec2": "available", "es": "available", "events": "available", "firehose": "available", "iam": "available", "kinesis": "available", "kms": "running", "lambda": "available", "logs": "available", "opensearch": "available", "redshift": "available", "resource-groups": "available", "resourcegroupstaggingapi": "available", "route53": "available", "route53resolver": "available", "s3": "running", "s3control": "available", "secretsmanager": "available", "ses": "available", "sns": "available", "sqs": "available", "ssm": "available", "stepfunctions": "available", "sts": "available", "support": "available", "swf": "available", "transcribe": "available"}, "version": "2.0.2.dev"}
When I send POST to reset endpoint
# curl -v --request POST http://localhost:4566/_localstack/state/reset
...
* Trying 127.0.0.1...
* TCP_NODELAY set
* Expire in 149999 ms for 3 (transfer 0x560608a80110)
* Expire in 200 ms for 4 (transfer 0x560608a80110)
* Connected to localhost (127.0.0.1) port 4566 (#0)
> POST /_localstack/state/reset HTTP/1.1
> Host: localhost:4566
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 404
< Content-Type: text/plain; charset=utf-8
< Connection: close
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: HEAD,GET,PUT,POST,DELETE,OPTIONS,PATCH
< Access-Control-Allow-Headers: authorization,cache-control,content-length,content-md5,content-type,etag,location,x-amz-acl,x-amz-content-sha256,x-amz-date,x-amz-request-id,x-amz-security-token,x-amz-tagging,x-amz-target,x-amz-user-agent,x-amz-version-id,x-amzn-requestid,x-localstack-target,amz-sdk-invocation-id,amz-sdk-request
< Access-Control-Expose-Headers: etag,x-amz-version-id
< Content-Length: 0
< date: Wed, 19 Apr 2023 13:57:41 GMT
< server: hypercorn-h11
<
* Closing connection 0
All requests I send from inside localstack container.
Docker image contains only one COPY of init script
FROM localstack/localstack:latest
COPY --chmod=755 ./test/scripts/init_localstack.sh /etc/localstack/init/ready.d/init_localstack.sh