Skip to content

AWS S3 301 Moved Permanently handling #312

Closed
@francisdb

Description

The Alpakka S3 client currently silently ignores 301 responses that might occur when reading from the wrong region. The official client logs a warning in this case.

Would be nice if at least some warning/error were logged, I had to turn on debug logging for akka.http to see why my bucket listings were empty.
A automatic redirect follow + logged warning about performance is also am option.

(on the side, the official client also has a way to detect the correct bucket by providing the name: client.getBucketLocation(bucket))

16:42:44.082 DEBUG - a.h.impl.engine.client.PoolGateway   - (Re-)starting host connection pool to s3-eu-central-1.amazonaws.com:443
16:42:44.090 DEBUG - a.h.impl.engine.client.PoolGateway   - InputBuffer (max-open-requests = 32) now filled with 1 request after enqueuing GET /foo.plugins Empty
16:42:44.091 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] Unconnected -> Loaded(1)
16:42:44.091 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] <unconnected> Establishing connection...
16:42:44.093 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] <unconnected> pushing request to connection: GET /foo.plugins Empty
16:42:44.274 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] </192.168.1.149:52507->s3-eu-central-1.amazonaws.com:443> Received response: GET /foo.plugins Empty -> 301 Moved Permanently Chunked
16:42:44.279 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] </192.168.1.149:52507->s3-eu-central-1.amazonaws.com:443> Finished reading response entity for GET /foo.plugins Empty -> 301 Moved Permanently Chunked
16:42:44.279 DEBUG - a.h.impl.engine.client.PoolGateway   - [0] Loaded(1) -> Idle

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions