Search code examples
amazon-web-servicesaws-lambdaredisamazon-elasticache

how can aws service update the corresponding redis cluster


Currently I have several redis clusters for different env. In my code, I will write data to redis inside my lambda function, if I deploy this lambda to my aws account, how can it update the corresponding redis cluster? Since every environment has its own redis cluster.

enter image description here

enter image description here


Solution

  • You can have a config file with Redis cluster name and their hostnames and in code, you can pick different clusters based on the env provided.

    If you are using roles in the AWS account, for each environment then you should also do STS on requirred role