Gmail or Outlook to push notifications to SQS

1

I am working on a requirement, where we need to do some action (Email Processing (out of scope of this requirement)), whenever we receive an email in Client's Gmail or Outlook account.

Since we don't own these domains, so setting up Email Receiving Pipelines via SES (https://aws.amazon.com/getting-started/hands-on/setup-email-receiving-pipeline/faq/) is out of question here.

The solution that we thought of for this problem statement is Setting up a Gmail push notifications to hit AWS Api Gateway, which internally would call AWS Lambda for inserting data in SQS.

Changes involved are :- AWS:

  1. Create an SQS Queue.
  2. Create an AWS Lambda inserting data in SQS.
  3. Create an API Gateway invoking AWS Lambda.

Google Cloud:

  1. Create a Pub / Sub topic.
  2. Create a subscription for Api Gateway url.
  3. Create a watch on Gmail. The watcher would invoke topic on any change in Gmail.

Can someone please validate above approach?

1 個回答
0
已接受的答案

That's a valid approach. Two comments:

  • If this is the only Lambda function you have you might also consider Lambda Function URLs - they are simpler to set up than API Gateway but also don't come with all the features that API Gateway does. So which you use is going to depend on what else you need.
  • You don't have to but you should be authenticating the caller somehow. That will also influence your decision on which endpoint type to use.
profile pictureAWS
專家
已回答 2 年前
  • Just to add that if all your Lambda function does is to add the message to SQS, you can use direct service integration in API Gateway to send the message directly into SQS, without the Lambda function.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南