【问题标题】:AWS CLI: SES Configset Destination errors outAWS CLI:SES Configset Destination 错误输出
【发布时间】:2020-08-25 13:56:24
【问题描述】:

我创建了一个 SES 配置集并尝试使用 CLI 添加 SNS Event-Destination,但我总是收到此错误,

[root@me]# aws --version
aws-cli/1.18.51 Python/2.7.5 Linux/3.10.0-1062.18.1.el7.x86_64 botocore/1.16.1
[root@me]# aws ses update-configuration-set-event-destination  --generate-cli-skeleton
{
    "ConfigurationSetName": "",
    "EventDestination": {
        "Name": "",
        "Enabled": true,
        "MatchingEventTypes": [
            "open"
        ],
        "KinesisFirehoseDestination": {
            "IAMRoleARN": "",
            "DeliveryStreamARN": ""
        },
        "CloudWatchDestination": {
            "DimensionConfigurations": [
                {
                    "DimensionName": "",
                    "DimensionValueSource": "linkTag",
                    "DefaultDimensionValue": ""
                }
            ]
        },
        "SNSDestination": {
            "TopicARN": ""
        }
    }
}

[root@me]# aws ses list-configuration-sets
{
    "ConfigurationSets": [
        {
            "Name": "my-ses-configset"
        }
    ]
}
[root@me]# aws ses update-configuration-set-event-destination --cli-input-json  {     "ConfigurationSetName": "my-ses-configset",     "EventDestination": {         "Name": "my-sns-destination",         "Enabled": true,         "MatchingEventTypes": [             "reject"         ],         "SNSDestination": {             "TopicARN": "<my SNS Topic ARN>"         }     } }

Unknown options: my-ses-configset,, EventDestination:, {, Name:, my-sns-destination,, Enabled:, true,, MatchingEventTypes:, [, bounce, ],, SNSDestination:, {, TopicARN:, <my SNS Topic ARN>, }, }, }, ConfigurationSetName:

这里有什么问题?我正在提供正确的 SNS-topic-arn。

【问题讨论】:

    标签: json amazon-web-services amazon-sns amazon-ses


    【解决方案1】:

    您需要将输入的 json 用单引号括起来,否则 json 中空格分隔的字符串将被解释为命令行参数。这就是您收到Unknown options 错误消息的原因。

    【讨论】:

    • 非常感谢@jellycsc,它对我有用。即使我提到了awsclibuilder.com/home/services/ses,但它应该是 AWS 或文档应该在引号中明确提到(可能看起来很傻,但它有帮助)。
    • @Krishna 很高兴。我很高兴它有帮助◡̈
    猜你喜欢
    • 2016-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-26
    • 2015-11-17
    • 1970-01-01
    • 2022-11-26
    • 1970-01-01
    相关资源
    最近更新 更多