Skip to content

Latest commit

 

History

History
 
 

aws-rust-simple-http-endpoint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Serverless Boilerplate - AWS - Rust

Make sure serverless is installed. See installation guide.

You will also need to set up your AWS account credentials using environment variables or a configuration file. Please see the this guide for more information.

1. Install Project Dependencies

npm install in this directory to download the modules from package.json.

2. Compile Rust Binary

$ cargo build --release

3. Deploy

Hackish way to deploy

  1. Run sls deploy which would give an error about missing file path in the package path.
  2. If you look at .serverless it should have 3 files-

cloudformation-template-create-stack.json cloudformation-template-update-stack.json serverless-state.json

  1. rename .serverless folder to p
  2. cargo build --release then add aws-rust-simple-http-endpoint.zip which consists of target/release/test only to the p folder
  3. sls deploy --package p

4. Invoke deployed function

$ curl https://***.execute-api.us-east-1.amazonaws.com/test/test
{"message":"Serverless Rust Hello"}

For more information on the Serverless AWS plugin, please see the project repository: https://serverless.com/framework/docs/providers/AWS/guide/credentials/.