I did my due diligence in trying to find this answer. But sorry in advance if this is redundant (and thank you in advance for any advice/suggestions/resources):
I'm trying to create a Snapchat clone. I'm using Amplify as my client (to bring together AppSync, Cognito, and S3). Is it possible to, upon image uploads (and associated mutations), query a 24-hour delayed mutation to delete the image (for Snapchat-like disappearing)? I don't want the delete request to have to be triggered on the client... but it seems that there's a timeout for AppSync resolvers. Any ideas?
Thank you!
You can create a 24 hour rule in your S3 bucket to delete the images, which will be automatically taken care of. If you want to modify other data based on the delete, you can create a trigger to Lambda or SNS and perform any other actions you want to do on those ones.
To configure the rule in AWS S3, it is a onetime setting.
Detailed screenshot explanation is covered here,
https://www.joe0.com/2017/05/24/amazon-s3-how-to-delete-files-older-than-x-days/
Hope it helps.