Skip to main content

A CLI which automatically uploads pip packages and directories to aws efs to be used in aws lambda

Project description

badges:

Downloads downloads

colab with example

Documentation

Quick Start

  1. Install via pip3
pip3 install efsync
  1. sync your pip packages or files to AWS EFS
efsync -cf efsync.yaml

Examples

CLI Example with efsync.yaml

sync your pip packages or files to AWS EFS

efsync -cf efsync.yaml

CLI Example with parameter

sync your pip packages or files to AWS EFS

efsync -r requirements.txt -py 3.8 -epd lib -fd tmp -ap schueler -ar eu-central-1 -sbd <subnet_id> -ekn <ec2-key-name>

SDK Example with efsync.yaml

create an configuration file efsync.yaml

# lambda ci python version for pip installation
python_version: 3.8
# pip directory
efs_pip_dir: lib
# extra directory for file upload like ML models
file_dir: dir
# requirements file
requirements: requirements.txt
# aws profile configuration
aws_profile: efsync
aws_region: eu-central-1

#aws vpc and ec2 shit
subnet_Id: subnet-xxx
ec2_key_name: efsync-asd913fjgq3
  1. sync your pip packages or files to AWS EFS
from efsync import efsync

efsync('efsync.yaml')

CLI

cli_short cli_long default description
-h --help - displays all commands
-r --requirements requirements.txt path of your requirements.txt
-cf --config_file - path of your efsync.yaml
-py --python_version 3.8 Python version used to install dependencies
-epd --efs_pip_dir lib directory where the pip packages will be installed on efs
-fd --file_dir tmp directory where all other files will be placed
-ap --aws_profile efsync name of the used AWS profile
-ar --aws_region eu-central-1 aws region where the efs is running
-sbd --subnet_Id - subnet id of the efs
-ekn --ec2_key_name - temporary key name for the ec2 instance

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

efsync-0.1.2.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

efsync-0.1.2-py3-none-any.whl (13.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page