I managed to come up with a solution, AWS ElastiCache seems like it doesn't support localhost so I ran the api with a docker container so we can setup valkey, and it works like a charm, it also didn't affect the deployed api which is great.