I'm trying to test out the timeout for a signed PUT S3 URL but files always get uploaded to localstack s3 regardless. Same code works (Spring Boot) and does time out returning 403 FORBIDDEN on an actual S3 bucket hosted in AWS. Is it possible to get that to work? I looked at the localstack docs and it doesn't say if this is part of premium. Spring boot 3.2.5, localstack 3.6.0, testcontainers 1.19.8.
By default in LocalStack, S3 pre-signed URL signature validation and expiration is not enforced. You can enable it with S3_SKIP_SIGNATURE_VALIDATION=0
.
If you're enabling the signature validation, please make sure to set the AWS_SECRET_ACCESS_KEY
to test
.
Here's the page for the configuration options for S3: https://docs.localstack.cloud/references/configuration/#s3