This is a super simple tool for creating/modifying multiple lambda functions.
It was built for the purpose of deploying our Alexa skills across multiple regions in the same account.
Installation
Just use pip:
$ pip install simple-aws-lambda-maker
Then create a salm.yml with something like:
---
function_defaults:
filepath: "{config_root}/lambda_function.py"
runtime: "python2.7"
role: "arn:aws:iam::1234567890:role/lambda_basic_execution"
timeout: 8
handler: "lambda_function.lambda_handler"
functions:
prod:
- name: test
region: us-east-1
description: "Test function"
env:
ONE: "1"
TWO: "2"
tags:
three: "four"
- name: test2
region: us-east-1
description: "Test function 2"
env:
ONE: "3"
TWO: "4"
tags:
three: "four"
staging:
- name: test3
region: us-east-1
description: "Test function 2"
env:
ONE: "5"
TWO: "6"
tags:
three: "four"
Here we are creating three functions, called test, test2 and test3.
They are all put into us-east-1 and have different values for the ONE and TWO environment variables.
All of them also have the options in the function_defaults block, which includes a reference to a file relative to this file called ./lambda_function.py
For example:
import os
def lambda_handler(event, context):
return "{0} - {1}".format(os.environ["ONE"], os.environ["TWO"])
We can then determine if anything will be created or changed by going into that directory and saying:
$ salm deploy staging --dry-run
And then to actually apply those changes:
$ salm deploy staging
And to do the prod group, do a salm deploy prod
Changelog
- 0.3.0 - 3 March 2020
Updated dependencies
Formatted and linted code
- 0.2.0 - 23 January 2019
Started using ruamel.yaml instead of PyYaml to load configuration
- 0.1.10 - 5 November 2018
Update requests for CVE-2018-18074
- Pre 0.1.10
No changelog kept
Metadata
Release files for simple-aws-lambda-maker 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simple-aws-lambda-maker-0.3.0.tar.gz | 11.5 kB | Without provenance | Details for simple-aws-lambda-maker-0.3.0.tar.gz |
Release files / simple-aws-lambda-maker-0.3.0.tar.gz
| Download URL | simple-aws-lambda-maker-0.3.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cad22bb06f8050ce12fe8e192f45ef72e6786402b53848a7d7d403abe815cc83
|
|
BLAKE2b-256 checksum How to use checksums |
10385efdeb658523dae10f335f8103130af5da79078fbe36b3888f3429e88fa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
|
Security for simple-aws-lambda-maker 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.