I personally like AWS Lambdas very much and am always looking for interesting use-cases, like this one. I don&#x27;t quite get what your code is supposed to do yet, but I have some initial comments about the implementation, hope it&#x27;s ok.<p>There are two things that glare at me immediately, a) the vendoring of the redis code (including pyc files) and b) the need to define static credentials in the code itself.<p>There are two little tools I would like to point your attention to, that may ease this pain.<p>Here is a pybuilder plugin to make deploying lambdas much easier, it can generate a lambda-zip for you (including all dependencies) and upload it to S3 so that you can use it in a CFN template:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ImmobilienScout24&#x2F;pybuilder_aws_plugin" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ImmobilienScout24&#x2F;pybuilder_aws_plugin</a><p>The second is a tool to configure lambdas, by placing &quot;things&quot; (e.g. redis creds) in the description field of the lambda. This way, you can speparate code and configuration cleanly:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ImmobilienScout24&#x2F;aws-lambda-configurer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ImmobilienScout24&#x2F;aws-lambda-configurer</a>