当前位置:  开发笔记 > 前端 > 正文

如何将Amazon SES权限写入您的Amazon S3存储桶

如何解决《如何将AmazonSES权限写入您的AmazonS3存储桶》经验,为你挑选了1个好方法。

我希望我的SES(AWS)可以接收电子邮件,因此我按照以下教程, http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-getting-started-receipt-rule.html

当我在最后一步 - 创建规则时,它会出现以下错误, 无法写入存储桶:"email-receiving"

我谷歌并发现此信息(http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html)可以解决问题.

但是,在添加我的策略语句时,它会出现错误 - 此策略包含以下错误:已禁止字段Principal有关IAM策略语法的详细信息,请参阅AWS IAM策略.

我的政策声明是,

{"Version":"2012-10-17","Statement":[{"Sid":"GiveSESPermissionToWriteEmail","Effect":"Allow","Principal":{"Service":["ses.amazonaws. com"]},"Action":["s3:PutObject"],"Resource":"arn:aws:s3 ::: mybulketname/*","Condition":{"StringEquals":{"aws:Referer" :"my12accountId"}}}]}

如果我起飞

"校长":{"服务":["ses.amazonaws.com"]}

验证政策将通过.

谢谢



1> Yevgeniy Afa..:

找到bucket-> permission-> bucketPolicy

{
    "Version": "2012-10-17",
    "Statement": [
       {
           "Sid": "AllowSESPuts",
           "Effect": "Allow",
           "Principal": {
               "Service": "ses.amazonaws.com"
           },
           "Action": "s3:PutObject",
           "Resource": "arn:aws:s3:::BUCKEN_NAME/*",
           "Condition": {
            "StringEquals": {
                   "aws:Referer": "YOUR ID"
                }
           }
       }
   ]
}

在此处阅读更多内容https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html

要在AWS管理控制台上查找您的AWS账户ID号,请选择右上方导航栏上的Support,然后选择Support Center.您当前登录的帐户ID显示在"支持"菜单下方的右上角.

点击此处了解更多信息https://docs.aws.amazon.com/IAM/latest/UserGuide/console_account-alias.html

推荐阅读
大大炮
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有