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」
任何人都可以幫助我嗎?