Skip to main content

Python Simple Serverless for AWS Lambda Project.

Project description

aws-lambda-sls

Python Simple Serverless for AWS Lambda Project.

Quick Start

You can create lambda Lambda sls service:

from aws_lambda_sls import LambdaSls

app = LambdaSls("sls_app")
app.run()

Register Lambda Function

from aws_lambda_sls import register_function


@register_function
def lambda_handler(event, context):
    return {
        "event": event,
        "aws_request_id": context.aws_request_id
    }

Commands

Create App

Usage: sls create-app [OPTIONS] PROJECT_NAME

Options:
  --help  Show this message and exit.

Package App

Usage: sls package [OPTIONS]

Options:
  --generate-sam    Create a single packaged file. By default, the 'out'
                    argument specifies a directory in which the package assets
                    will be placed.  If this argument is specified, a single
                    zip file will be created instead.
  --stage TEXT      lambda function stage, default dev.
  --out TEXT        lambda package out directory, default dist.
  --force-download  If force download dependency lib, default false.
  --help            Show this message and exit.

Deploy App

Usage: sls deploy [OPTIONS]

Options:
  --stage TEXT        Name of the sls stage to deploy to. Specifying a new sls
                      stage will create an entirely new set of AWS resources.
  --profile TEXT      Override profile at deploy time.
  --deploy-file TEXT  deployment file.
  --s3-key TEXT       s3 file.
  --help              Show this message and exit.

Create Local Lambda Server.

Usage: sls local [OPTIONS]

Options:
  --host TEXT
  --port INTEGER
  --stage TEXT        Name of the sls stage for the local server to use.
  --deploy-file TEXT  deployment file.
  --log-file TEXT     output log file path.
  --help              Show this message and exit.

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

aws-lambda-sls-0.1.0.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

aws_lambda_sls-0.1.0-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file aws-lambda-sls-0.1.0.tar.gz.

File metadata

  • Download URL: aws-lambda-sls-0.1.0.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for aws-lambda-sls-0.1.0.tar.gz
Algorithm Hash digest
SHA256 16d7ebed6561edd3d73b1e0ae28701efe1b333fc861897511aa1b9d6636b6247
MD5 5f92d4311c9f825e950304e7fc339302
BLAKE2b-256 bbb31056ebf0c1a4cb1db75525ebadf926ca42251670aea89e48513155d1bf53

See more details on using hashes here.

File details

Details for the file aws_lambda_sls-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aws_lambda_sls-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for aws_lambda_sls-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e6a7530790c78ccc214b81774b3c72a7433fc9b49b84d6f57eb6b77d2119dc5
MD5 1795eabec5305ed5bfb0d07bdadb4e52
BLAKE2b-256 1446941d307a1ea2fb5e1f78bd99ee6526e6a466b957848d0ba5380856dff263

See more details on using hashes here.

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