2 ms·
The easy way to get around this is to use AWS CodeBuild with the built in Python Docker image and have it trigger when you push. You can trigger a build from ei
by scarface74 8y ago
The easy way to get around this is to use AWS CodeBuild with the built in Python Docker image and have it trigger when you push. You can trigger a build from either AWS Code Commit or GitHub.
As part of the buildspec.yml just import all of your dependencies using
pip install {package} -t . # (The period at the end forces it to install in the local directory.
In your artifacts section make sure you include everything.
CodeBuild will then create a zip file that you can load into the console.
For bonus points, once you create the lambda manually for the first time using the AWS console, you can export the CloudFormation yml file and use that as part of your automation strategy where you have a CF Parameter that specifies the name of your zip file that was uploaded to S3 by CodeBuild.
I use this strategy all of the time to develop on Windows and deploy to lambda.