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

Hi @daphnenhuch, could you please try using the localstack/localstack:latest release of LocalStack? The S3 service was completely rewritten in LocalStack v2.0 and should provide a better user experience.

I’ve tried updating to localstack 2.0 but unfortunately it breaks all of our Kinesis tests in ways that we cannot understand. See my issue here: bug: PutRecord throws Kinesis Error when it did not used to · Issue #7924 · localstack/localstack · GitHub

We are currently looking into the kinesis issue and hope to help you upgrade to the latest LocalStack version.

Hi @daphnenhuch,

Could you please let us know if the issue is resolved in the LocalStack v2.x?

Thanks.

1 Like