1
我使用下面的代码:我不能发布SNS信息如电子邮件
AmazonSNSClient snsClient = new AmazonSNSClient(credentials);
snsClient.setRegion(Region.getRegion(Regions.SA_EAST_1));
String msg = "My text published to SNS topic with email endpoint";
String arn = "XXXXX";
PublishRequest publishRequest = new PublishRequest("topicARN here",msg);
PublishResult publishResult = snsClient.publish(publishRequest);
但我得到下面的错误。
“抛出:InvalidParameterException:状态码:400,AWS服务:AmazonSNS, AWS请求ID:446fef49-4eba-5484-ba4c-bf82682cdc46,AWS错误代码: 无效参数,AWS错误消息:无效参数:TopicArn”
任何人都可以帮助我吗?