Skip to content

dkzkb/amazonlinux-lambda-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

amazonlinux-lambda-python

Environment for creating a Lambda function deployment package ( Python )

Requirement

  • Docker
  • Docker Compose

Usage

  1. Get Docker files.
$ git clone git@github.com:dkzkb/amazonlinux-lambda-python.git  
$ cd amazonlinux-lambda-python 
  1. If necessary, edit the python version in Dockerfile.
    (default is v3.6.5)
# Dockerfile  

ARG python_majar_version='3'
ARG python_minor_version='6'
ARG python_batch_version='5'
  1. Build and up docker.
$ docker-compose build  
$ docker-compose up -d  
  1. Get into docker.
$ docker-compose exec app /bin/bash  
  1. Add a lambda function file.
$ pwd  
/share  
$ touch lambda_function.py  
  1. Install required packages.
$ pip install some-package-name -t .  
  1. Archive files.
$ zip -r upload.zip *  
  1. Upload a zip file to lambda.

Author

@dkzkb

License

MIT

About

Environment for creating a Lambda function deployment package ( Python )

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published