使用 s3-bucket-ssl-requests-only 存储桶策略拒绝访问 S3 存储桶
我正在AWS EKS群集上运行一个应用程序,其中一个POD可以访问我的S3存储桶。它可以正常工作,直到我添加存储措施策略为止。
当我添加s3-bucket-ssl-requests-仅限桶策略时(像这样: https://aws.amazon.com/premiumsupport/knowledge-center/s3-bucket-policy-policy-policy-for-config-rule/ )存储桶并收到访问拒绝的消息。
有人知道这样做的原因是什么?
我只是在学习AWS,所以请了解。如有必要,我将提供更多详细信息。
编辑:
我添加的确切策略:
{
"Id": "ExamplePolicy",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowSSLRequestsOnly",
"Action": "s3:*",
"Effect": "Deny",
"Resource": [
"arn:aws:s3:::my_bucket_name",
"arn:aws:s3:::my_bucket_name/*"
],
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
},
"Principal": "*"
}
]
}
其中my_bucket_name
是我的存储桶的名称
I am running an application on AWS EKS cluster and one of the pods has access to my S3 bucket. It works fine until I add a bucket policy.
When I add s3-bucket-ssl-requests-only bucket policy (like this one: https://aws.amazon.com/premiumsupport/knowledge-center/s3-bucket-policy-for-config-rule/), my pod loses accesses to S3 bucket and receives the Access Denied message.
Does anyone have an idea what could be the reason for this and how to allow my pod to access to the bucket with s3-bucket-ssl-requests-only policy?
I am only learning AWS, so please be understanding. I will provide more details if necessary.
EDIT:
The exact policy that I have added:
{
"Id": "ExamplePolicy",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowSSLRequestsOnly",
"Action": "s3:*",
"Effect": "Deny",
"Resource": [
"arn:aws:s3:::my_bucket_name",
"arn:aws:s3:::my_bucket_name/*"
],
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
},
"Principal": "*"
}
]
}
where my_bucket_name
is the name of my bucket
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论