I’m trying to put an S3 object using HTTPS. My CI tests are failing because CI runs with HTTPS and expects all Put requests to also be in HTTPS. I’m using the Javascript SDK and currently setting the endpoint
to https://localhost.localstack.cloud'
when initializing the s3 client.
Then when I do s3Client.createMultipartUploadAsync(...params)
I see the following error:
{
"message": "Client network socket disconnected before secure TLS connection was established",
"code": "TimeoutError",
"path": null,
"host": "<bucket name>.localhost.localstack.cloud",
"port": 443,
"time": "2023-04-28T19:14:56.974Z",
"region": "us-east-1",
"hostname": "airtable-attachment-uploads-development.localhost.localstack.cloud",
"retryable": true
}
I’m currently running localstack locally using the following configuration:
version: '3.4'
services:
localstack:
image: localstack/localstack:1.1.0
# Localstack has an edge proxy that can handle forwarding to all services.
ports:
- '127.0.0.1:4566:4566'
- '127.0.0.1:443:443'
environment:
- LS_LOG=warn
# - DEBUG=True - very noisy but can be useful to debug localstack itself.
- EDGE_PORT_HTTP=1
- DATA_DIR=/data
- DOCKER_HOST=unix:///var/run/docker.sock
# override the default KMS_PROVIDER since the default one does not fail
# subsequent decrypt calls after the key has been disabled. See -
# https://github.com/localstack/localstack/issues/5410#issuecomment-1239507078
- KMS_PROVIDER=local-kms
volumes:
- ./init-scripts/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh # ready hook
healthcheck:
test: curl localhost:4566
start_period: 60s
interval: 5s
timeout: 3s
retries: 10