title: Python script to warm AWS lambda for cold start problem
body: <p>I followed the lambda-warmer <a href="https://github.com/jeremydaly/lambda-warmer" rel="nofollow noreferrer">https://github.com/jeremydaly/lambda-warmer</a> for NodeJS to create a similar script for python:</p>
  
  <ul>
  <li>Warm the lambda function every a few minutes</li>
  <li>Warm more than one lambda functions if I set up the concurrency parameters</li>
  </ul>
  
  <p>Here is my python code:
  <a href="https://github.com/pafun/lambda-warmer-python/blob/master/lambda-warmer-python.py" rel="nofollow noreferrer">https://github.com/pafun/lambda-warmer-python/blob/master/lambda-warmer-python.py</a></p>
  
  <p>Here is a typical input:</p>
  
  <pre><code>{
      "flag": "warmer", 
      "concurrency": 10,
      "test": false,
      "delay": 300
  }
  </code></pre>
  
  <p>Usually, the script won't warm up the exact number of instances for me unless I increase the delay time. Like the above example input, I usually get 6-8 Concurrent Executions as I observed in lambda AWS monitor.</p>
  
  <p><strong>How can I make sure the exact number of lambda instances will be warmed?</strong></p>