Does Amazon S3 support HTTP request with basic authentication

前端 未结 8 869
予麋鹿
予麋鹿 2020-12-04 15:17

I would like to set up an Amazon S3 account, create a bucket, upload some data, and that this data will be available using HTTP GET with basic authentication

8条回答
  •  天涯浪人
    2020-12-04 15:40

    You can develop it yourself as a web app or a part of your existing application. It will consume HTTP requests, retrieve their URI component, convert it to S3 object name and use getObject() to get its content (using one of available S3 SDKs, for example AWS Java SDK).

    Otherwise, you can try a hosted solution - s3auth.com (I'm a developer). It's an open source project, and you can see how this mechanism is implemented internally at one of its core classes. HTTP request is processed by the service and then re-translated to Amazon S3 internal authentication scheme:

    This architecture diagram explains how the project is implemented. The PNG picture is loaded from Amazon S3 bucket maven.s3auth.com, which is not readable anonymously. Full URL of this image is

    http://s3auth:s3auth@maven.s3auth.com/texry/packages.png
    

    Check also this article: Basic HTTP Auth for S3 Buckets

提交回复
热议问题