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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则