I believe this is a common pattern but i am trying to enable my API Gateway to serve my Angular Webapp by pulling it from S3. I have my api gateway set up with a GET set up at the / route that is pulling my index.html from the appropraite location in my s3 bucket and another Get set up at /${folder} where file is a specific file. When i hit the root of my api gateway my index.html is pulled and then that triggers requests to pull the needed js/css files via the /{folder} endpoint to get the app to actually run. woohoo!
now i want to make sure that all but my index.html file are cached so that im certain im getting the latest index.html (since the name of that file never changes) but the resources that file references should only have to go to S3 once (or whenever the longest TTL of the cache is itll have to pull it again, thats fine)
My confusion comes with the “stage level cache configuration” and the “method level cache configuration”. I have enabled caching for my method /{folder} method but not the root method as i dont want the index.html to be cached
but i have not enabled the cache on the stage level
so are my js/css files being cached right now or not? And if i do enable the stage level caching how do i make sure that the index.html is not cached? Thank you! As of now i am not interested in using CloudFront but am probably going to look into it down the road.