Very simple deploy tool for aws lambda
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file simple-aws-lambda-maker-0.3.0.tar.gz
.
File metadata
- Download URL: simple-aws-lambda-maker-0.3.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad22bb06f8050ce12fe8e192f45ef72e6786402b53848a7d7d403abe815cc83 |
|
MD5 | 26008d014accd6bbe3646c1fbc6933b8 |
|
BLAKE2b-256 | 10385efdeb658523dae10f335f8103130af5da79078fbe36b3888f3429e88fa3 |