maxday / rust-pizza-workshop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clone this repo

git clone https://github.com/maxday/rust-pizza-workshop.git && cd rust-pizza-workshop

Run the env

./run.sh <SECRET>

Create your first Lambda Function

cargo lambda new --template https://github.com/maxday/rust-workshop --no-interactive hello-${SUFFIX}

Enter your hello function directory

cd hello-${SUFFIX}

Build!

cargo lambda build

Deploy!

cargo lambda deploy --iam-role $DEPLOY_ROLE_ARN

Invoke your function using the aws-cli!

cargo lambda invoke --remote hello-${SUFFIX} --data-ascii '{ "message": "Hello from workshop!" }'

Let's create a Function url

cargo lambda deploy --iam-role $DEPLOY_ROLE_ARN --enable-function-url

Invoke your function using URL

⚠️ Replace <REPLACE_ME> with the function url generated by the previous command

curl -v '<REPLACE_ME>' \
-H 'content-type: application/json' \
-d '{ "message": "Hello from workshop!" }'

About


Languages

Language:Shell 100.0%