GithubHelp home page GithubHelp logo

rust-aws-lambda's Introduction

AWS Lambda

Source

Semicolon YouTuber: https://www.youtube.com/watch?v=qL2mh1k3cTc&list=PLDi2liHqCnVomqnjLp9Jq1jk-XFWque6C

Prerequisites and Installation

curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

Setup

  1. Clone the repository:
git clone [email protected]:AuroraLantean/rust-aws-lambda.git
cd rust-aws-lambda
  1. Build binaries
cargo lambda build --release --arm64
zip dummy.zip target/lambda/aws-lambda/bootstrap -j
cp dummy.zip ~/
  1. Deployment to AWS
  • Loging to AWS, on top right, set data center to one close to you.
  • Search for "Lambda", click on "Create A Function", then "Author from scratch".
  • Configuration: Function Name: dummy, Runtime = Amazon Linux 2023(for Go/Rust/C++), Architecture = arm64(according to what architecture you have built your lambda function), then click on "Create Function"
  • Under Code tab: Code Source, click on "Upload from", then select your built lambda function
  • Under Configuration, and Function URL: Create function URL, Auth = None(so the API is open to the public)
  • Copy the function URL, use one of the API senders below
  • Under "Monitor" tab, click on "View CloudWatch logs"

API Endpoints

https://abc123.lambda-url.ap-northeast-2.on.aws/

https://abc123.lambda-url.ap-northeast-2.on.aws/?name=Jack

Use Insomnia to send Requests

Use Slumber to send Requests

slumber request -p production root
slumber request -p production get_tasks | jq
slumber request -p production add_task1
slumber request -p production update_task1
slumber request -p production delete_task1

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE.

rust-aws-lambda's People

Contributors

auroralantean 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.