Skip to main content

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)

Source distribution for simple-aws-lambda-maker 0.3.0
File Size Uploaded
simple-aws-lambda-maker-0.3.0.tar.gz 11.5 kB Details

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

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file

0.2.0

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page