Skip to main content

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

Project description

efsync

Downloads Open In Colab pypi package deployment

efsync is an CLI tool/ sdk to automatically upload files and dependencies to AWS EFS. The CLI is easy to use, you only need access to an AWS Account, an AWS EFS-filesystem up and running, and Docker installed. I wrote an article with an complete walkthrough. you can check this one out here or simply start with the Quick Start.

Documentation

Quick Start

Example in Google Colab. Open In Colab

  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>  -efi  <efs_filesystem_id>

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
# Defines if the efs should be cleaned up before uploading
clean_efs: True
# aws profile configuration
aws_profile: efsync
aws_region: eu-central-1

#aws vpc and ec2 shit
efs_filesystem_id: fs-2adfas123
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
-efi --efs_filesystem_id - File System ID from the EFS filesystem
-ce --clean_efs True Defines if the EFS should be cleaned up before uploading
-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.2.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

efsync-0.2.2-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file efsync-0.2.2.tar.gz.

File metadata

  • Download URL: efsync-0.2.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for efsync-0.2.2.tar.gz
Algorithm Hash digest
SHA256 1efa89a08ee2b219904591c3a6d5beea4f094b223b5c4e2946adb2f04c42b144
MD5 37f75196ffb1e9da3af32c01a8999fa3
BLAKE2b-256 eba3e1fe9c177077d794aceeab89712b6b7329912401f6a02f807c060e31a2b2

See more details on using hashes here.

Provenance

File details

Details for the file efsync-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: efsync-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for efsync-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9970ffc171d09cf2f2449ae88da5bb3961a7e89ec15277b6f35ae641a0d1369
MD5 b8bd7cb38b4e39f80ff41be29a983607
BLAKE2b-256 183012634f7c986e954d802e911a88a7ab5c3b81a8ac18ebcd5fb542b3d04c0b

See more details on using hashes here.

Provenance

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