I found the code below at https://forums.aws.amazon.com/thread.jspa?threadID=53629:
AmazonSimpleNotificationService sns = AWSClientFactory.CreateAmazonSNSClient(key, secret);
PublishRequest req = new PublishRequest();
req.WithMessage("This is my test message");
req.WithSubject("The Test Subject");
req.WithTopicArn(topicArn);
PublishResponse result = sns.Publish(req);
But does it work in .NET Core? If so how, and what using statements?
I used this Nuget install:
Install-Package AWSSDK.SimpleNotificationService -Version 3.3.0.23
Are the methods totally different? Just poking around using Intellisense, I have found:
var req = new AmazonSimpleNotificationServiceRequest();
var client = new AmazonSimpleNotificationServiceClient();
but req. doesn't show any properties.
I've tried searching here: https://docs.aws.amazon.com/sdkfornet/v3/apidocs/Index.html but it is saying "The service is currently unavailable. Please try again after some time." (so yes, I will try later, but not sure it will have what I want anyhow).
--- Update 10/30 - This is the the only publish method of the
AmazonSimpleNotificationServiceRequest() class

--- Update 2 on 10/30 - Found this post: Send SMS using AWS SNS - .Net Core
Created new question for code that I'm trying, but it's not working: How to call SNS PublishAsync from Lambda Function?
AmazonSimpleNotificationServiceClientinstance, and it shows theusingstatements you will need. After that it's pretty obvious if you look at the SDK doc for the client here: docs.aws.amazon.com/sdkfornet/v3/apidocs/Index.html that you would need to call theAmazonSimpleNotificationServiceClient.publish()method.