|
| 1 | +<div align="center"> |
| 2 | + |
1 | 3 | # Learn Aws Lambda |
2 | 4 |
|
3 | 5 |  |
4 | 6 |
|
5 | | -Learn to use AWS Lambda to create scalable micro-services in less time |
6 | | -and cost *far* less to run than "*traditional*" server-based apps. |
7 | | - |
8 | | -[](https://github.com/codeship/documentation/issues/335) |
9 | | -[](https://codecov.io/github/dwyl/learn-aws-lambda?branch=master) |
10 | | -[](https://david-dm.org/dwyl/learn-aws-lambda) |
11 | | -[](https://david-dm.org/dwyl/learn-aws-lambda?type=dev) |
12 | | -[](https://github.com/dwyl/learn-aws-lambda/issues) |
13 | | - |
| 7 | +Learn to use `AWS Lambda` |
| 8 | +to create **scalable micro-services**<br /> |
| 9 | +in less time |
| 10 | +and lower overhead |
| 11 | +than "*traditional*" server-based apps. |
| 12 | + |
| 13 | +[](https://github.com/dwyl/learn-aws-lambda/actions/workflows/ci.yml) |
| 14 | +[](https://codecov.io/github/dwyl/hits?branch=main) |
| 15 | +[](https://github.com/dwyl/learn-aws-lambda) |
| 16 | +[](https://github.com/dwyl/learn-aws-lambda/issues/) |
| 17 | +</div> |
| 18 | + |
| 19 | +# Disclaimer ⚠️ |
| 20 | + |
| 21 | +We wrote these notes from **2015 - 2021** |
| 22 | +to **_extensively_ capture** our **knowledge** of using `AWS Lambda` |
| 23 | +to build both simple functions |
| 24 | +(e.g: "send email" or "transform an image") |
| 25 | +and more advanced "serverless apps". |
| 26 | +All credit to |
| 27 | +[Nikhi](https://github.com/nikhilaravi) |
| 28 | +and |
| 29 | +[Jack](https://github.com/jackcarlisle) |
| 30 | +for their superb work, |
| 31 | +subsequently extended/improved by |
| 32 | +[other dwylers](https://github.com/dwyl/learn-aws-lambda/graphs/contributors?all=1). |
| 33 | +🫶 |
| 34 | + |
| 35 | +While the notes can still serve as a **reference**, |
| 36 | +they are **no longer current** with the **_latest_ `Lambda` UI**. |
| 37 | + |
| 38 | +Most of the code examples will still work because they are reasonable simple. |
| 39 | +If you get stuck with any of them, |
| 40 | +please |
| 41 | +[open an issue](https://github.com/dwyl/learn-aws-lambda/issues). |
| 42 | + |
| 43 | +We still have several functions running smoothly on `Lambda` |
| 44 | +with zero maintenance required (beyond updating Node.js version), |
| 45 | +both for our own internal apps and client apps, |
| 46 | +but we have not had time to update the notes. ⏳ |
| 47 | +e.g: |
| 48 | +[dwyl/**aws-ses-lambda**](https://github.com/dwyl/aws-ses-lambda) |
| 49 | +and |
| 50 | +[`github-scraper/lambda`](https://github.com/nelsonic/github-scraper/tree/main/lambda) |
| 51 | + |
| 52 | +We also built our own micro `Lambda` **deployment tool**: |
| 53 | +[dwyl/**aws-lambda-deploy**](https://github.com/dwyl/aws-lambda-deploy) |
| 54 | +which still works flawlessly 10+ years later! |
| 55 | +A testament to its simplicity and |
| 56 | +[ultra-low dependency count!](https://github.com/dwyl/aws-lambda-deploy/blob/5b5518696e28e77800994c48f2d3a3af75bd0e5d/package.json#L71-L74) |
| 57 | + |
| 58 | +`AWS` recently released a new feature |
| 59 | +that allows directly calling a `Lambda` function |
| 60 | +via a URL without requiring the complexity of `API Gateway`: |
| 61 | +[dwyl/learn-aws-lambda#124](https://github.com/dwyl/learn-aws-lambda/issues/124). |
| 62 | +This **_significantly_ simplifies** invoking `Lambda` |
| 63 | +functions from other non-lambda apps. |
| 64 | + |
| 65 | +If you're looking for a way to offload some processing to `Lambda` |
| 66 | +from your existing non-lambda app/backend, |
| 67 | +we recommend exploring this option. |
| 68 | + |
| 69 | +We **do _not_ recommend** building an entire (complex) |
| 70 | +"[Serverless](https://github.com/dwyl/learn-aws-lambda/issues/119)" |
| 71 | +backend using `Lambda` |
| 72 | +because the request/response time is quite slow compared to a |
| 73 | +[**`Phoenix`**](https://github.com/dwyl/technology-stack) |
| 74 | +App |
| 75 | +and more tedious to test & deploy all the moving parts. |
| 76 | +But for simpler async functions it's great |
| 77 | +and there is a |
| 78 | +[_generous_ one million requests **free tier**](https://aws.amazon.com/lambda/pricing/). |
| 79 | + |
| 80 | +Happy Coding! ❤️ |
14 | 81 |
|
15 | 82 | ## Contents |
16 | 83 |
|
@@ -210,7 +277,7 @@ by following one of the previous examples!)_ |
210 | 277 |
|
211 | 278 | 5. Now let's test our endpoint to see if our Lambda function is being invoked. Go to the AWS console and then click on 'API Gateway' under Application Services. This will take you to a list of your APIs where you should see the one we just created. Click on the title. |
212 | 279 |
|
213 | | -  |
| 280 | +  |
214 | 281 |
|
215 | 282 | 6. Click on the METHOD beneath your Lambda function, in our case it's 'POST'. Then click on the word 'TEST' with the lightning bolt underneath it: |
216 | 283 |
|
|
0 commit comments