Giter Club home page Giter Club logo

rusty-lambda-quick-start's Introduction

Rusty-Lambda-Quick-Start

A simple set of scripts for generating scaffolding for AWS Lambda Functions.

Scripting

The script in this folder will generate the scaffolding for a Rust Lambda function that is ready to be compiled for aarch64.

The scaffolding includes:

  • an edit to the Cargo.toml that will aid compiling
  • a script to compile the code for aarch64
  • a script to create a new lambda function with the name you supply in the first argument
  • a script to update that lambda function using the name that you supply in the first argument
  • a folder for your modules with the name that you supply in the optional second argument

Dependencies

  • Rust/rustup
  • Cargo Lambda
  • Docker
  • Cross
  • AWS CLI
  • aarch64-unknown-linux-musl toolchain for rustup

Preparing to call the script for the first time

  • Ensure that you have the dependencies installed. Feel free to ask Chat GPT for assistance.
  • Make sure it's executable with sudo chmod +x ./create_lambda.sh
  • Configure the AWS CLI
  • Create an IAM Role for the lambda function(s)
  • Copy the arn for that IAM Role and insert it into line 75 of create_lambda.sh
  • Once you are ready, place this scripting folder in the folder you want your Rust functions to be in.

If you are not using WSL:

You will probably need to comment out line 57 of create_lambda.sh, and then uncomment line 59.

Calling the script

Navigate to this folder and call it with ./create_lambda.sh "your_lambda_name" "your_modules_folder_name"

The modules folder name is optional.

This script will make a directory in the parent folder of /scripting/.

Building your lambda function

All you gotta do is call ./build.sh,

Deploying your lambda function

All you gotta do is call ./deploy.sh, but you have to configure the AWS CLI prior to using it. Also, be sure to set the Lambda's IAM Role on line 75 of create_lambda.sh.

If there's a vim output showing up after calling this script, you can close it with q.

Updating your lambda function

All you gotta do is call ./update_func.sh

If there's a vim output showing up after calling this script, you can close it with q.

rusty-lambda-quick-start's People

Contributors

nstilt1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.