Reputation: 816
I would like to set up an apollo graphql server using AWS. I tried setting up apollo-server-lambda with AWS Lambda and it works perfectly fine, however it lacks pretty important feature: subscriptions, and for those you would need a websocket server.
I saw this solution for this problem https://github.com/ioxe/graphql-aws-iot-server which uses AWS IoT to handle subscriptions but it seems to be rather complex and non-maintained.
My question is it a right solution to get subscription or should I just set up an EC2 instance and run apollo sever there?
Also, If I do set up an EC2 instance for that, will it be easier to set up and how should it be scaled?
P.S. Before you ask, I am aware about AWS AppSync and this service is not suitable as it has a big problem with N+1 issues, long query execution times and broken android client.
Upvotes: 0
Views: 779
Reputation: 138
I am currently using AWS Lambda, but when I need to add subscriptions I am planning on migrating to Elastic Beanstalk, rather than just a simple EC2 Instance, as it does a lot of scaling for you, and since apollo server 2 it's about one line of code to switch from Lambda to Beanstalk
Upvotes: 3