Skip to main content

Sym AWS Lambda Integration Helpers

Project description

sym-awslambda-py

Python modules to simplify Sym lambda integrations.

Dispatch Configuration

Sym provides a standard dispatch handler that you can use to automatically route Sym messages to the right handler.

First import the dispatch function in your main handler.py file:

from sym.awslambda.dispatch import dispatch

Then in your Terraform lambda declaration, set handler.dispatch as your handler value:

resource "aws_lambda_function" "sym" {

  ...

  handler = "handler.dispatch"

  ...
}

sym_action decorator

The Sym dispatcher will delegate incoming messages to the appropriate handler based on the sym_action decorator:

from sym.awslambda.decorators import sym_action


@sym_action("approve")
def approve(approval, context):

    print("Target reason:", approval.request.meta.reason)
    ....

Message types

The messages that sym actions receive are defined as protobufs in the Sym Types repo.

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

sym-awslambda-1.0.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

sym_awslambda-1.0.3-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file sym-awslambda-1.0.3.tar.gz.

File metadata

  • Download URL: sym-awslambda-1.0.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for sym-awslambda-1.0.3.tar.gz
Algorithm Hash digest
SHA256 89e89bd8b195e91255382704e58a7630f9b8cafdda4a517dd89d5698a4c65054
MD5 60038b6b263302e7f7d99abd8dd0e347
BLAKE2b-256 868b42e287e372c10c784dd8c01e7405337c06645cebbc9c313642fb6c6cee0c

See more details on using hashes here.

File details

Details for the file sym_awslambda-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: sym_awslambda-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.2 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/46.4.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for sym_awslambda-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4a0ed612c3b1c2d13e53df4b1b25c586ca1523732aaeb10aa4fd1cf12d2b6557
MD5 3881dabc21526512be5841f4b1f9f001
BLAKE2b-256 bad5da6983402ccc7aca5bde64f9a88b5a43fae35438f2d262a7cc2f9200e094

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