Hi Murali, thanks for reaching out. This article is bit outdated refer to this blog that i wrote does the same things but the code and Sam template are readily available for consumption
https://aws.amazon.com/blogs/compute/caching-data-and-configuration-settings-with-aws-lambda-extensions/