Back in 2019 at AWS reInvent, we faced a similar predicament with our serverless SEO architecture. Our Lambda functions were dynamically generating sitemaps and robots.txt files but they weren't being indexed properly by Google due to issues with content freshness signals. We learned the hard way that while AWS offers powerful tools, it doesn’t always play nicely with search engines out-of-the box. To fix this issue we had to implement custom headers and caching strategies using API Gateway & CloudFront for better indexability of our serverless resources [code]
https://aws.amazon.com/blogs/architecture/serverless-seo-techniques[/code]. Hopefully, these lessons help you avoid similar pitfalls in 2025!