I'm trying to create push notifications for my mobile application.
Is it possible integrate Delphi FireMonkey with Amazon SNS services?
Thanks.
(Using Delphi 10 Seattle)
The Amazon APIs are REST based. You can simply use the INDY component library or maybe even the Rest Client that shipped recently with Delphi. Also, Delphi has built in classes for talking to many of the AMAZON services like S3. You can use those as an example.
Amazon Integrator from n/software makes it easy to access Amazon Web Services from Delphi
Easy-to-use components can be used to add, modify and delete objects stored on S3 or SimpleDB, add or remove messages from SQS, integrate with ASW e-commerce services, or control EC2 instances. As well as SNS
https://www.nsoftware.com/in/amazon/
Short answer is Yes.
Its possible to use Amazon Cloud API with Delphi. Extending Cloud API, Amazon Simple Notification Service (SNS) let you send notifications using different protocols including email, http and push notifications. (TAmazonSNS Service)
There are 3 provided classes to access Amazon Web Services with Cloud API:
Simple Storage Service (S3)
Simple Database Service (SimpleDB)
Simple Queue Service (SQS)
Also you can check Paweł Głowacki's Amazon Web Services Delphi CodeRage X demos from here.
Related
I am new to AWS and I am trying to build a web application where every time I type in my name and address and click the submit button, I want this information to be sent to SNS to notify a device that a new entry has been received along with the inputs given. I am wondering if I should first create a lambda function to get my name and address before triggering the SNS. I am still not clear what would be a good workflow here.
If you want to interact with Amazon SNS from a web app, you do not need to write a lot of Lambda functions to interact with the service. Instead, you can directly invoke the SNS Service by using the Amazon SNS API.
For example, assume you want to write a Web app using Java. To solve this use case, you can write the Web App using Spring BOOT and then use the SNS Java API to invoke SNS Service Operations, as discussed in this development article.
Creating a Publish/Subscription Spring Boot Application
Likewise, if you are using another programming language, you can use that given API to build the web app and invoke SNS operations.
I was wondering if anyone could advise the "best" (I know that's subjective, but meaning "best" as in least amount of work/steps) to trigger sending an E-mail from Amazon AWS. The Message body with contain dynamic variables/data from my App (Spring boot) so I will have to wire that in somehow, and it should be triggered from within my Application whenever it finishes processing some data, since my app reads .CSV data.
I cannot use JavaMail/Jakarta to send e-mail from within app as all Containers I have have blocked ports
Preferably using some type of AWS service since I'm already hosting this app on AWS ECS cluster
I would like to do it programmatically:
AWS provides Amazon Simple Email Service (SES) which is:
is an email platform that provides an easy, cost-effective way for you to send and receive email using your own email addresses and domains.
To use that, you would add SES permissions to your ECS tasks role. This way, you don't need to hard-code any AWS credentials into your application, as they will be automatically obtained by AWS SDK when interacting with SES.
AWS also provides AWS SDK for java. Using the SDK you can send emails using SES as shown in the example Send an email using the AWS SDK for Java.
If you want to send an email from a Spring Boot app, then use the Simple Email Service Java V2 API. There is an AWS Java V2 tutorial that shows how to build a Spring BOOT app that uses various AWS Services to analyze photos located in an Amazon S3 bucket. This app uses the SES Java V2 API to send a report that contains the details of the Amazon Rekognition service that analyzes the photos.
I have set up the amazon lex bot in AWS and I am able to test this successfully in the Test bot section.
I started exploring accessing the amazon lex bot from the external web ui (my local application) and I found the tool called amazon aws lex web UI (https://github.com/aws-samples/aws-lex-web-ui) and It seems very complex to setup, I have few queries here
1) Is this (https://github.com/aws-samples/aws-lex-web-ui) the only way to use amazon lex bot from my local web application?
2) This section has the notes for running locally (https://github.com/aws-samples/aws-lex-web-ui#running-locally)
How to generate the amazon Cognito pool Id for the amazon lex bot?
Thanks,
Harry
1) No
Amazon Lex is ultimately a service, which means it can be called from any application that calls the API appropriately. The sample provided by AWS is just an example of how to call that API. So, this is not the only way to use Amazon Lex bots from your local web application.
You can create a fully custom Bot UI from scratch (like I did) that calls the Amazon Lex API to service your application. (More on this can be found at this question that another user has asked - note that the response for this question is done in C#)
2)
There is an example provided by AWS at the following link which has a section on how to set up Cognito for this purpose (again, this is what I used to set up my own Bot)
Hope this helps you!
https://github.com/aws-samples/aws-lex-web-ui is an utility tool, which you may use, but in most cases you will end up implementing your own display logic. It most cases it is connecting it to sms, facebook, whatsapp... You have an API https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html in which you can interact with Lex, I suggest using that.
I have an existing mobile app that can receive push notifications and I have an existing backend application that exposes an API for sending notifications to the app. The backend application uses Firebase Cloud Messaging (FCM), so it could be considered a wrapper around FCM. My backend application uses the Firebase Admin SDK to create messages and send them to Firebase. My customers hit an API exposed by my backend application (so, if we assume that the customer is using Postman, then the flow for sending a message is: Postman->My backend application->Firebase->Mobile app).
Until now I have been running my backend application on a local server, and it works fine. But now I need to deploy this on AWS. My question is: is it necessary to use Amazon SNS or not? I don't really need any additional functionality from AWS, I just want AWS to permit the required communication.
For example, I dont need to go to an AWS interface to enter the token to send messages to my phone. I already have an API exposed through my backend for sending messages. So, should I even bother to set up SNS?
I know that at a minimum I will have to make my firebase project google credentials available to my instance on AWS (in a file located at the path specified using GOOGLE_APPLICATION_CREDENTIALS). What other configuration steps would be needed? Thanks a lot.
After some investigation I found that it is not necessary to use Amazon SNS to achieve what I wanted to achieve.
I was able to deploy my server application (which uses Firebase Cloud Message) to AWS, and the messages arrive on the mobile phones without any problem.
I initialized my backend application using the steps described on the Google Firebase site: https://firebase.google.com/docs/admin/setup
I have an AWS account ./ server. How can I send a text message in C# from a desktop app using AWS. I can't seem to find any examples or helpful docs.
thanks
AWS doesn't offer a general purpose SMS messaging platform. It's SNS product does allow SMS as one of the optional delivery methods, but its not useful in a lot of scenarios because it requires users devices to be 'subscribed' before getting text messages.
A better choice for a general purpose SMS messaging solution is going to be Twilio or Clickatel or other similar vendors - both of those can easily send general purpose/custom SMS messages to any cell phone (in countries they support), without the user previously subscribing to the service, using C# from a desktop app.
You need REST API hosted on your AWS EC2. Then you create desktop application that call http request to that service.