All Projects → khornberg → Elasticpypi

khornberg / Elasticpypi

Licence: apache-2.0
Serverless pypi

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Elasticpypi

Aws Toolkit Vscode
AWS Toolkit for Visual Studio Code, an extension for working with AWS services including AWS Lambda.
Stars: ✭ 823 (+342.47%)
Mutual labels:  aws, serverless, hacktoberfest
Serverless Dynamodb Local
Serverless Dynamodb Local Plugin - Allows to run dynamodb locally for serverless
Stars: ✭ 530 (+184.95%)
Mutual labels:  aws, serverless, hacktoberfest
Terraform Aws Next Js
Terraform module for building and deploying Next.js apps to AWS. Supports SSR (Lambda), Static (S3) and API (Lambda) pages.
Stars: ✭ 163 (-12.37%)
Mutual labels:  aws, serverless
Reference Architectures
A community project for capturing, sharing, exploring, and debating the patterns and practices being used in serverless production applications.
Stars: ✭ 166 (-10.75%)
Mutual labels:  aws, serverless
Php Examples For Aws Lambda
Demo serverless applications, examples code snippets and resources for PHP
Stars: ✭ 177 (-4.84%)
Mutual labels:  aws, serverless
Realworld Dynamodb Lambda
λ serverless backend implementation for RealWorld using AWS DynamoDB + Lambda
Stars: ✭ 185 (-0.54%)
Mutual labels:  aws, serverless
Aws Serverless Appsync App
This workshop shows you how to build a Web Application that demonstrates how easy it is to create data driven web applications all with no servers. You will build a serverless web application that lets users search for popular tourist destinations. The application will use AWS AppSync and the AWS Serverless platform to provide real-time weather analysis of the indexed destinations.
Stars: ✭ 162 (-12.9%)
Mutual labels:  aws, serverless
Serverlessish
Run the same Docker images in AWS Lambda and AWS ECS
Stars: ✭ 177 (-4.84%)
Mutual labels:  aws, serverless
Serverless Next.js
⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
Stars: ✭ 2,977 (+1500.54%)
Mutual labels:  aws, serverless
Chrome Aws Lambda
Chromium Binary for AWS Lambda and Google Cloud Functions
Stars: ✭ 2,502 (+1245.16%)
Mutual labels:  aws, serverless
Aws Serverless Data Lake Framework
Enterprise-grade, production-hardened, serverless data lake on AWS
Stars: ✭ 179 (-3.76%)
Mutual labels:  aws, serverless
Middy
🛵 The stylish Node.js middleware engine for AWS Lambda
Stars: ✭ 2,592 (+1293.55%)
Mutual labels:  aws, serverless
Components
The Serverless Framework's new infrastructure provisioning technology — Build, compose, & deploy serverless apps in seconds...
Stars: ✭ 2,259 (+1114.52%)
Mutual labels:  aws, serverless
Aws Serverless Cicd Workshop
Learn how to build a CI/CD pipeline for SAM-based applications
Stars: ✭ 158 (-15.05%)
Mutual labels:  aws, serverless
Sqs Worker Serverless
Example for SQS Worker in AWS Lambda using Serverless
Stars: ✭ 164 (-11.83%)
Mutual labels:  aws, serverless
Cartoonify
Deploy and scale serverless machine learning app - in 4 steps.
Stars: ✭ 157 (-15.59%)
Mutual labels:  aws, serverless
Serverless Aws Alias
Alias support for Serverless 1.x
Stars: ✭ 171 (-8.06%)
Mutual labels:  aws, serverless
Slic Starter
A complete, serverless starter project
Stars: ✭ 184 (-1.08%)
Mutual labels:  aws, serverless
Archive aws Lambda Go Net
Network I/O interface for AWS Lambda Go runtime.
Stars: ✭ 151 (-18.82%)
Mutual labels:  aws, serverless
Aws Amplify Workshop React
Building Serverless React Applications with AWS Amplify
Stars: ✭ 155 (-16.67%)
Mutual labels:  aws, serverless

elastic pypi

A fully functional, self-hosted simple pypi service running on AWS.

Caveats

Browse with a browser Browsers are currently limited by the removal of basic authentication for remote URLs via the URL (e.g. x:[email protected]). However, if you visit the URL directly, the browser will prompt you to either enter a username and password, or install this plugin for Chrome and setup the credentials accordingly.

Uploads through the api are limited to 6MB

Uploads are limited to 6MB through the API because Lambda limits the body size. https://docs.aws.amazon.com/lambda/latest/dg/limits.html#limits-list

Uploads directly to the S3 bucket are limited by whatever S3 does.

Only uploads through the API are checked for and discriminated by the overwrite configuration setting.

Downloads are limited to 10MB

This again is a limitation of AWS; specifically API Gateway. https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html#api-gateway-limits

Setup

  1. Edit serverless.yml

Configuration

serverless.yml

service: elasticpypi

provider:
  name: aws
  runtime: python3.6
  memorySize: 128
  stage: dev
  # profile: "some-local-aws-config-profile"
  # region: us-east-1

  environment:
    SERVICE: ${self:service}          # See above. Defaults to elasticpypi
    STAGE: "/${self:provider.stage}"  # See above. Defaults to dev
    BUCKET: "elasticpypi"             # CHANGE ME
    TABLE: "elasticpypi"              # You can change me if you want, but do you?
    USERNAME: "elasticpypi"           # You can change me if you want, but do you?
    PASSWORD: "something-secretive"   # CHANGE ME
    USERS: "my:blah,your:secret"      # OPTIONAL, default not present
    OVERWRITE: false                  # Allow uploads to overwrite already existing packages

Users

USERS may be a comma delimited string of username:password. If present it will be used instead of USERNAME and PASSWORD

Deploy

npm/yarn and pip are required to install the necessary packages to deploy.

  1. yarn or npm install
  2. sls deploy

Note that when deploying do not have the virtualenv activated. The wsgi plugin for serverless will automatically fetch the python requirements.

Using

Based on the output of the deploy command or via the AWS console add the url to your pip conf.

The url should be something like https://blah.execute-api.region.amazonaws.com/dev/simple.

Make sure you add a trailing slash as required in the PEP.

Make sure you add your basic authentication credentials to your url.

Throttling

AWS resources could be throttled. As such, if you are intending to dump a bunch of packages into the S3 bucket, please check your service and account limits. Additionally, changing the read and write capacity of dynamodb may help. It is currently set to the lowest possible unit (1).

Testing

Requirements

  1. Install testing requirements from test-requirements.txt
  2. Run python -m pytest

Using Docker

The example below runs the full test suite. To debug, add /bin/bash to the end of the command.

$ sudo docker build -t elasticpypi-test .
$ sudo docker run -it \
    -v $(pwd):/code \
    elasticpypi-test

Changelog

  • 2021-03-08 Add Cache-Control header so pip caches the package

  • 2020-10-12 Multiple users

  • 2018-11-26 HTTP Basic Authentication works for in browser browsing

  • 2018-01-04 Downloads up to 10 MB work without signed requests

  • 2017-12-27 Uploads work. Manually tested with python setup.py upload and twine upload

  • 2017-12-22 Use Python 3, downloads go through the API Gateway so pip's caching now works

  • 2017-03-24 The configuration has moved from ./elasticpypi/config.json to ./serverless.yml and is consumed by elasticpypi as environment variables. If you are upgrading from an older version, you may need to migrate your configuration to serverless.yml.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].