Skip to main content

A basic tool that simplifies the deployment of AWS lambda functions

Project description

Serverless Manager

A basic Python Tool that simplifies the deployment of multiple AWS Lambda functions directly from an AWS CodeCommit Repository.

Set Up

  • Set up an IAM user on your AWS console

    • You require the following permissions: Permissions for IAM user
    • Store the Access Key ID and the Secret Access Key
    • Generate the git credentials for the user. (Security Credentials -> HTTPS Git Credentials)
  • Create a CodeCommit Repository and clone it to your directory using the Git Credentials.

  • Create a CodeBuild Project

    • Set the source provider to CodeCommit and the repository to the newly created CodeCommit repository
    • Pick the branch you will be pushing to.
    • In buildspec, choose “Use a buildspec file” and leave the filename empty (Since the default is buildspec.yml
    • Create the project
    • Edit the environment variables and add the following variables: Environment Variables
    • The ENV_NAME_ variables refer to the different environments you would be deploying. For instance, I have 3 environments: dev, prod and uat. This allows us to deploy the lambda function at different stages (Creating a different function for each stage)
  • Create a CodePipeline

    • Source provider: AWS CodeCommit
    • Repo Name: Source repo
    • Build Provider: AWS CodeBuild
    • Project Name: Name of Codebuild Project
    • Skip deploy stage since we are using the Serverless Framework to deploy our functions
    • Create the Pipeline
  • Install serverless-manager and place it in the directory with your handlers

Using the tool

  • I have a file called handlerFun1.js. It contains the function firstFun() which I would like to deploy.
  • Run serverless manager on your terminal and follow the instructions: First Steps
    • Here, I created a service called "CodeCommitTest"
    • I set the AWS-region to us-east-2 (which is what my AWS console is set to).
    • The stage sets the serverless stage property.
    • The ENV_NAME is the last part of the ENV_NAME_ environment variables (which we set earlier). This will be reflected in the final name of your function on your console.
    • Module name follows the convention dir/filename.function
    • The function name is the name of the final lambda function (and is set in serverless.yml)
    • By default, the only file added to the current lambda function is the handler file provided in the module name. If you would like to include other files in the final lambda function that is deployed, you may edit the newly generated serverless.yml and add the required files to the functions/your_function/package/patterns
    • You may also edit/add any other properties in serverless.yml
    • Finally, the tool generates a buildspec.yml file for your function.
      • If you want to deploy all lambda functions present in serverless.yml you can press 'a' in the final step. Otherwise, press 'n'.
    • Once you have completed all your steps, you will see 2 new files serverless.yml (Which lists all the properties required to deploy using the Serverless Framework and buildspec.yml (Which instructs CodeBuild to deploy the function(s) using the given files and properties.

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

slsmanager-0.1.6.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slsmanager-0.1.6-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file slsmanager-0.1.6.tar.gz.

File metadata

  • Download URL: slsmanager-0.1.6.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.4

File hashes

Hashes for slsmanager-0.1.6.tar.gz
Algorithm Hash digest
SHA256 a6ec0e14ca792b52d292a12f639cb19676716fa9f4198190d46c2b37c82e6553
MD5 bdf96075f6f5d0f0ab9b7da882c2fac8
BLAKE2b-256 d7ead049ea4dc2f7568a9c6e264bba7f9f13434a00c4e3513f6751e18f775b6d

See more details on using hashes here.

File details

Details for the file slsmanager-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: slsmanager-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.4

File hashes

Hashes for slsmanager-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 df3d0c00412301f66e7fa25ed4720addda1af191a55ad377474bbcd35d744c1b
MD5 29cd12186b5d4a0e8fda8db1644191ad
BLAKE2b-256 9a381777df3c127141464ff8dc333383b88ec1db3e6000ccd5f9f57531a71c91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page