Started here: https://github.com/localstack/localstack/issues/12933#issuecomment-3137609362 Then moved here: https://github.com/aws/aws-cli/issues/9629 Which helped me figure out the issue. [awslocal patches `create_client` to configure the s3 endpoint specifically](https://github.com/localstack/awscli-local/blob/master/bin/awslocal#L201) when running certain commands. It looks like v1.41.9 of aws-cli wraps `create_client` in `create_nested_client`. I'm not an avid python user so I'm not 100% sure what is going on here but it seems like this overrides the wrapping that awslocal does. I think the solution should be pretty simple. There is an `AWS_ENDPOINT_URL` that can be set per service or for all services. Setting this environment variable in [`prepare_environment`](https://github.com/localstack/awscli-local/blob/master/bin/awslocal#L94) should replace the necessity of a lot of the rest of the wrapper I think