Implementation here.
In this chapter we'll build a social network from scratch. It will be simple, but we'll touch a lot of aspects of making apps on top of AppSync.
The app will allow users to publish posts on their timeline and see their friends' posts as well as to write comments. Also, it will update the feed in real-time for new posts and comments.
Logging in, the app shows the current user's feed and the friends list:
Commenting is possible for every post:
To implement this app, we'll:
The example repo uses Terraform for IaC, so you can easily deploy the project to your account and experiment with the code. Just don't forget to destroy it when you are done.
If you deploy the example project in your account, don't forget to run terraform destroy
to clean it up when you are finished.
While the API itself does not cost much when idle, there is a data generator Lambda function that is constantly running and calling the API. Over time, it can accumulate costs.