I've been working on updating a Lambda function, but I'm encountering an issue where it seems to not reflect the latest code changes. After fixing an error that occurred when calling the function through Postman, I can run tests within the Lambda console, and they work fine. However, when I attempt to call it via Postman, I continuously receive the same error. I've even gone back to previous code versions, and the response remains unchanged. I've redeployed both the Lambda and the API Gateway multiple times, but nothing seems to resolve the issue. The flush cache option is grayed out for the stages, and I'm at a loss for what to do next. Is it a common problem to have to wait for cloud services to update, or is there something specific about AWS that's going wrong? Is my only option to inform my managers to just wait it out?
1 Answer
Welcome to the cloud! 😅 AWS can be really tricky sometimes. First, double-check that your API Gateway is actually connected to the $LATEST version of your Lambda function and not an older version. Even if you redeployed Lambda, remember that you also need to click "Deploy API" within the API Gateway console to update your changes. It’s likely that Postman is calling the Gateway that’s still serving an old cached response. Don’t rely on it to eventually fix itself, it won’t!

I did verify that, and it hasn’t been an issue before. I checked to ensure it doesn’t end with a revision number, and it all seems fine.