Skip to content

Commit d76b5ae

Browse files
authored
Merge pull request #7 from FireTail-io/simplify-docs
Simplify docs
2 parents a798abe + 2ac3519 commit d76b5ae

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

README.md

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,35 +72,16 @@ Create an account at [Firetail.App](https://firetail.app/), then:
7272

7373
### Building The Firetail AppSync Lambda
7474

75-
The Firetail AppSync Lambda is written in Go, and can be built using the standard `go build` command. First, clone the repository and change directory into `logs-handler`, where the Lambda's source is located:
76-
77-
```bash
78-
git clone [email protected]:FireTail-io/firetail-appsync-lambda.git
79-
cd firetail-appsync-lambda/logs-hander
80-
```
81-
82-
Before building the source into a binary, set `GOARCH` to `amd64` and `GOOS` to `linux` to ensure the binary will be compatible with the [Lambda Go runtime](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html):
83-
84-
```bash
85-
GOARCH=amd64 GOOS=linux
86-
```
87-
88-
Next, build the binary and output it into a `bin` directory at the root of the repository. `-ldflags="-s -w"` can be used to marginally reduce the size of the binary:
89-
90-
```bash
91-
go build -ldflags="-s -w" -o ../bin/logs-handler
92-
```
93-
94-
The [serverless.yml](./serverless.yml) provided in the root of this repository can be used to deploy this binary to Lambda, and expects the binary to be found in a `bin` directory at the root of the repository, hence `-o ../bin/logs-handler`.
95-
96-
The process of building the Firetail AppSync Lambda binary can alternatively be performed using [the Makefile at the root of this repository](./Makefile), using the `build` target:
75+
The process of building the Firetail AppSync Lambda binary can be performed using [the Makefile at the root of this repository](./Makefile), using the `build` target:
9776

9877
```bash
9978
git clone [email protected]:FireTail-io/firetail-appsync-lambda.git
10079
cd firetail-appsync-lambda
10180
make build
10281
```
10382

83+
A more in-depth explanation of how to build the Firetail AppSync Lambda from source can be found in [docs/build-from-src.md](./docs/build-from-src.md).
84+
10485

10586

10687
### Deploying The Firetail AppSync Lambda With Serverless

docs/build-from-src.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Building The Firetail AppSync Lambda From Source
2+
3+
The Firetail AppSync Lambda is written in Go, and can be built using the standard `go build` command. First, clone the repository and change directory into `logs-handler`, where the Lambda's source is located:
4+
5+
```bash
6+
git clone [email protected]:FireTail-io/firetail-appsync-lambda.git
7+
cd firetail-appsync-lambda/logs-hander
8+
```
9+
10+
Before building the source into a binary, set `GOARCH` to `amd64` and `GOOS` to `linux` to ensure the binary will be compatible with the [Lambda Go runtime](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html):
11+
12+
```bash
13+
export GOARCH=amd64 GOOS=linux
14+
```
15+
16+
Next, build the binary and output it into a `bin` directory at the root of the repository. `-ldflags="-s -w"` can be used to marginally reduce the size of the binary:
17+
18+
```bash
19+
go build -ldflags="-s -w" -o ../bin/logs-handler
20+
```
21+
22+
The [serverless.yml](./serverless.yml) provided in the root of this repository can be used to deploy this binary to Lambda, and expects the binary to be found in a `bin` directory at the root of the repository, hence `-o ../bin/logs-handler`.

0 commit comments

Comments
 (0)