I've been reading the Cloudfront docs and I want to make sure that my plan is reasonable. I have a backend API structured as an EC2 HTTP server with frequently updating content (several changes per second). This is my understanding:
- I shouldn't expose this HTTP server directly to clients because that makes the EC2 server vulnerable to DDOS attacks
- Creating a layer of indirection with CloudFront edge locations helps defend against DDOS because AWS can deploy a firewall at the outside of the network rather than right around my EC2 instance
- By setting Maximum TTL = 0, I ensure that Cloudfront is merely an indirection layer and doesn't try to do any actual caching so that users always get up-to-date information.
Are these assumptions correct / does my plan sound reasonable? It seems from reading online that this is a nonstandard use of Cloudfront.