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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠