在Amazon S3上强制使用SSL [英] Force SSL on Amazon S3

查看:869
本文介绍了在Amazon S3上强制使用SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以(通过IAM,存储桶策略或其他方式)强制Amazon S3 通过HTTPS / SSL提供内容并拒绝所有常规的,未加密的HTTP访问?

Is it possible (via IAM, bucket policy, or otherwise) to force Amazon S3 to only serve content over HTTPS/SSL and deny all regular, unencrypted HTTP access?

推荐答案

我相信这可以使用存储桶策略来实现。使用条件aws拒绝对相关存储桶的所有http请求:SecureTransport:false。

以下内容未经过测试,但它应该让您了解如何为您的案例设置它。

I believe this can be achieved using a bucket policy. Deny all http requests to the bucket in question using the condition aws:SecureTransport : false.
The following is not tested but it should give you an idea of how to set it up for your case.

{
    "Statement":[
        {
            "Action": "s3:*",
            "Effect":"Deny",
            "Principal": "*",
            "Resource":"arn:aws:s3:::bucketname/*",
            "Condition":{
                "Bool":
                { "aws:SecureTransport": false }
            }
        }
    ]
} 

这篇关于在Amazon S3上强制使用SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆