gpt4 book ai didi

amazon-web-services - 无法在 S3 中配置 SQS 队列通知

转载 作者:行者123 更新时间:2023-12-03 14:25:16 26 4
gpt4 key购买 nike

我创建了一个 SQS 队列并在权限选项卡下添加了策略,仅允许我的帐户用户配置配置通知

政策文件

{
"Version": "2012-10-17",
"Id": "arn:aws:sqs:us-east-1:111111111111:sqsqueue/SQSDefaultPolicy",
"Statement": [
{
"Sid": "Sid111111111111",
"Effect": "Allow",
"Principal": {
"AWS": "111111111111"
},
"Action": [
"sqs:SendMessage",
"sqs:ReceiveMessage"
],
"Resource": "arn:aws:sqs:us-east-1:111111111111:queue"
}
]

导航到 S3 并尝试为上述队列配置事件通知,它抛出错误

Unable to validate the following destination configurations. Permissions on the destination queue do not allow S3 to publish notifications from this bucket. (arn:aws:sqs:us-east-1:111111111111:queue)*



难道我做错了什么?有人能帮助我吗

最佳答案

我能够通过添加“服务”来解决这个问题:“s3.amazonaws.com”
在 Principal 标签中。

这里是政策文件

    {
"Version": "2012-10-17",
"Id": "arn:aws:sqs:us-east-1:111111111111:sqsqueue/SQSDefaultPolicy",
"Statement": [
{
"Sid": "Sid111111111111",
"Effect": "Allow",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Action": [
"sqs:SendMessage",
"sqs:ReceiveMessage"
],
"Resource": "arn:aws:sqs:us-east-1:111111111111:queue"
}
]


这在 https://forums.aws.amazon.com/thread.jspa?threadID=173251 中有解释

关于amazon-web-services - 无法在 S3 中配置 SQS 队列通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54791704/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com