Skip to content

Commit bc97041

Browse files
committed
docs: update readme files
1 parent a17f03f commit bc97041

5 files changed

Lines changed: 24 additions & 122 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Docbox Serverless AWS
2+
3+
This is a serverless variant of [Docbox](https://github.com/docbox-nz/docbox) designed to run as a
4+
collection of lambdas rather than a persistent server.
5+
6+
> This is currently a work-in-progress implementation

cspell.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"dotenv",
1111
"onlyoffice",
1212
"dtolnay",
13-
"poppler"
13+
"poppler",
14+
"jacobtread",
15+
"loker",
16+
"TYPESENSE"
1417
]
1518
}

lambdas/http/README.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Introduction
1+
# Docbox HTTP Lambda
22

3-
http is a Rust project that implements an AWS Lambda function in Rust.
3+
This lambda is responsible for providing the HTTP API for Docbox
44

55
## Prerequisites
66

@@ -12,46 +12,3 @@ http is a Rust project that implements an AWS Lambda function in Rust.
1212
To build the project for production, run `cargo lambda build --release`. Remove the `--release` flag to build for development.
1313

1414
Read more about building your lambda function in [the Cargo Lambda documentation](https://www.cargo-lambda.info/commands/build.html).
15-
16-
## Testing
17-
18-
You can run regular Rust unit tests with `cargo test`.
19-
20-
If you want to run integration tests locally, you can use the `cargo lambda watch` and `cargo lambda invoke` commands to do it.
21-
22-
First, run `cargo lambda watch` to start a local server. When you make changes to the code, the server will automatically restart.
23-
24-
Second, you'll need a way to pass the event data to the lambda function.
25-
26-
You can use the existent [event payloads](https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/lambda-events/src/fixtures) in the Rust Runtime repository if your lambda function is using one of the supported event types.
27-
28-
You can use those examples directly with the `--data-example` flag, where the value is the name of the file in the [lambda-events](https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/lambda-events/src/fixtures) repository without the `example_` prefix and the `.json` extension.
29-
30-
```bash
31-
cargo lambda invoke --data-example apigw-request
32-
```
33-
34-
For generic events, where you define the event data structure, you can create a JSON file with the data you want to test with. For example:
35-
36-
```json
37-
{
38-
"command": "test"
39-
}
40-
```
41-
42-
Then, run `cargo lambda invoke --data-file ./data.json` to invoke the function with the data in `data.json`.
43-
44-
For HTTP events, you can also call the function directly with cURL or any other HTTP client. For example:
45-
46-
```bash
47-
curl https://localhost:9000
48-
```
49-
50-
Read more about running the local server in [the Cargo Lambda documentation for the `watch` command](https://www.cargo-lambda.info/commands/watch.html).
51-
Read more about invoking the function in [the Cargo Lambda documentation for the `invoke` command](https://www.cargo-lambda.info/commands/invoke.html).
52-
53-
## Deploying
54-
55-
To deploy the project, run `cargo lambda deploy`. This will create an IAM role and a Lambda function in your AWS account.
56-
57-
Read more about deploying your lambda function in [the Cargo Lambda documentation](https://www.cargo-lambda.info/commands/deploy.html).
Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
# Introduction
1+
# Docbox Presigned Cleanup Lambda
22

33
presigned-cleanup is a background task to perform cleanup and deletion of
44
expired presigned file upload resource
55

6+
This should be connected like so:
7+
8+
Amazon Event Bridge Trigger ("rate(1 hour)") -> Docbox Presigned Cleanup Lambda
9+
10+
> Adjust schedule to you're desired cleanup rate.
11+
612
## Prerequisites
713

814
- [Rust](https://www.rust-lang.org/tools/install)
@@ -13,40 +19,3 @@ expired presigned file upload resource
1319
To build the project for production, run `cargo lambda build --release`. Remove the `--release` flag to build for development.
1420

1521
Read more about building your lambda function in [the Cargo Lambda documentation](https://www.cargo-lambda.info/commands/build.html).
16-
17-
## Testing
18-
19-
You can run regular Rust unit tests with `cargo test`.
20-
21-
If you want to run integration tests locally, you can use the `cargo lambda watch` and `cargo lambda invoke` commands to do it.
22-
23-
First, run `cargo lambda watch` to start a local server. When you make changes to the code, the server will automatically restart.
24-
25-
Second, you'll need a way to pass the event data to the lambda function.
26-
27-
You can use the existent [event payloads](https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/lambda-events/src/fixtures) in the Rust Runtime repository if your lambda function is using one of the supported event types.
28-
29-
You can use those examples directly with the `--data-example` flag, where the value is the name of the file in the [lambda-events](https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/lambda-events/src/fixtures) repository without the `example_` prefix and the `.json` extension.
30-
31-
```bash
32-
cargo lambda invoke --data-example apigw-request
33-
```
34-
35-
For generic events, where you define the event data structure, you can create a JSON file with the data you want to test with. For example:
36-
37-
```json
38-
{
39-
"command": "test"
40-
}
41-
```
42-
43-
Then, run `cargo lambda invoke --data-file ./data.json` to invoke the function with the data in `data.json`.
44-
45-
Read more about running the local server in [the Cargo Lambda documentation for the `watch` command](https://www.cargo-lambda.info/commands/watch.html).
46-
Read more about invoking the function in [the Cargo Lambda documentation for the `invoke` command](https://www.cargo-lambda.info/commands/invoke.html).
47-
48-
## Deploying
49-
50-
To deploy the project, run `cargo lambda deploy`. This will create an IAM role and a Lambda function in your AWS account.
51-
52-
Read more about deploying your lambda function in [the Cargo Lambda documentation](https://www.cargo-lambda.info/commands/deploy.html).
Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
# Introduction
1+
# Docbox Upload Completion Lambda
22

33
upload-completion is a handler for file upload completions to S3 to handle
44
finishing presigned file uploads
55

6+
This should be connected like so:
7+
8+
S3 Object Created Event -> SQS -> Docbox Upload Completion Lambda
9+
610
## Prerequisites
711

812
- [Rust](https://www.rust-lang.org/tools/install)
@@ -13,40 +17,3 @@ finishing presigned file uploads
1317
To build the project for production, run `cargo lambda build --release`. Remove the `--release` flag to build for development.
1418

1519
Read more about building your lambda function in [the Cargo Lambda documentation](https://www.cargo-lambda.info/commands/build.html).
16-
17-
## Testing
18-
19-
You can run regular Rust unit tests with `cargo test`.
20-
21-
If you want to run integration tests locally, you can use the `cargo lambda watch` and `cargo lambda invoke` commands to do it.
22-
23-
First, run `cargo lambda watch` to start a local server. When you make changes to the code, the server will automatically restart.
24-
25-
Second, you'll need a way to pass the event data to the lambda function.
26-
27-
You can use the existent [event payloads](https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/lambda-events/src/fixtures) in the Rust Runtime repository if your lambda function is using one of the supported event types.
28-
29-
You can use those examples directly with the `--data-example` flag, where the value is the name of the file in the [lambda-events](https://github.com/awslabs/aws-lambda-rust-runtime/tree/main/lambda-events/src/fixtures) repository without the `example_` prefix and the `.json` extension.
30-
31-
```bash
32-
cargo lambda invoke --data-example apigw-request
33-
```
34-
35-
For generic events, where you define the event data structure, you can create a JSON file with the data you want to test with. For example:
36-
37-
```json
38-
{
39-
"command": "test"
40-
}
41-
```
42-
43-
Then, run `cargo lambda invoke --data-file ./data.json` to invoke the function with the data in `data.json`.
44-
45-
Read more about running the local server in [the Cargo Lambda documentation for the `watch` command](https://www.cargo-lambda.info/commands/watch.html).
46-
Read more about invoking the function in [the Cargo Lambda documentation for the `invoke` command](https://www.cargo-lambda.info/commands/invoke.html).
47-
48-
## Deploying
49-
50-
To deploy the project, run `cargo lambda deploy`. This will create an IAM role and a Lambda function in your AWS account.
51-
52-
Read more about deploying your lambda function in [the Cargo Lambda documentation](https://www.cargo-lambda.info/commands/deploy.html).

0 commit comments

Comments
 (0)