Refreshing running instances of AWS Lambda with Docker image

Environment Description

We’re using AWS Lambda in our code, the Lambda is running a Docker image (new capability since around 2 months ago), it also has provisioned concurrency.

Our code uses Python 3.6 (though it is not really relevant to the question).


We use a mechanism that when an environment variable of the Lambda changes, it stops idle instances (like provisioned concurrency), and in the next invocation a new Lambda is created with the new environment variables.

It seems that it does not work the same way when using Docker images, provisioned concurrency instances do not "refresh".


How can this be solved? Is there any way when using a Docker image running on Lambda with provisioned concurrency to refresh all running instances (without deploying a new docker image of course)?

Source: Docker Questions