1

I am developing a React Native application for IOS and Android. I am using Django for my backend and aws rds for my database. It is deployed on AWS Lambda and both my lambdas and my rds are in a VPC. Everything worked well except for push notifications as they require my lambda functions to communicate to the public internet.

One way would be to create a NAT Gateway to allow that communication, but a NAT Gateway is quite costly.

I am thinking of another way which involves AWS Simple Notification Services (SNS). If I integrate that to my Django app, would the lambda functions be able to communicate with AWS SNS without requiring a NAT Gateway?

Rony Azrak
  • 527
  • 2
  • 6
  • 16

1 Answers1

1

It sounds like you want to create an SNS service endpoint within the VPC your lambda function runs in: https://docs.aws.amazon.com/sns/latest/dg/sns-publishing-to-topics-from-vpc.html

Service endpoints are kind of like building a tunnel from your VPC to a specific service so it isn't considered the external Internet. You are billed for them but the price is a LOT cheaper than a NAT gateway, and if you're provisioning with CloudFormation tends to save a lot of complexity with building routes, etc.

https://aws.amazon.com/privatelink/pricing/

bearda
  • 301
  • 1
  • 8
  • Thank you! Although I am unsure if push notifications would still require me to communicate with the public internet to retrieve APNs or FCM tokens. – Rony Azrak Mar 18 '19 at 17:14