Restarting AWS lambda function to clear cache

I made an Answer based on my comment and verification from @DejanVasic

aws lambda update-function-configuration --function-name "myLambda" --description "foo"

This will force the next invokation of the lambda to "cold start".

To verify:

@timestamp, @message | sort @timestamp desc | limit 1000 | filter @message like "cold_start:true"

Use the UpdateFunctionCode API endpoint to force a refresh of all containers. AWS SDKs wrap this up to make it easier for you to call the API using your preferred language.