Skip to content

Commit 8dd70c2

Browse files
authored
Add more info to README
1 parent d9afd6d commit 8dd70c2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,22 @@ find . \( -name \*.rs -o -name \*.tf -o -name \*.toml -o -name \*.md -o -name \*
3838
find . \( -name \*.rs -o -name \*.tf -o -name \*.toml -o -name \*.md -o -name \*.lock \) -exec sed -i '' "s#$TEMPLATE_NAME_SNAKE_CASE#$PROJECT_NAME#g" {} \;
3939
```
4040

41+
### Adding functionality
42+
43+
To create new Lambda functions, you can copy the `./src/bins/hello_world.rs` code to a new file in the same directory and modify the `function_handler` body with your desired functionality.
44+
Any new functions should be added as binaries in the `Cargo.toml` file, as follows:
45+
46+
```toml
47+
[[bin]]
48+
name = "<function_name>"
49+
path = "src/bins/<function_name>.rs"
50+
```
51+
52+
Any common code can be added to the library and split into modules just like in any other Cargo project.
53+
54+
For the infrastructure code, duplicate the code from the `./infrastructure/api.tf`, `./infrastructure/lambdas.tf`, and `./infrastructure/iam.tf` files, modifying the resource names and any fields referring to resource names. Any additional resources can be added to new files (e.g. `./infrastrucutre/s3.tf`).
55+
56+
4157
### Deployment
4258

4359
The recommended way for deploying the project is to use GitHub Actions; however, you can also do it from your local machine.

0 commit comments

Comments
 (0)