Skip to content

Commit 0d2a2c2

Browse files
ran-isenbergRan Isenberg
and
Ran Isenberg
authored
docs: bring back cookicutter (#755)
Co-authored-by: Ran Isenberg <ran.isenberg@ranthebuilder.cloud>
1 parent 7c5dd89 commit 0d2a2c2

File tree

4 files changed

+55
-4
lines changed

4 files changed

+55
-4
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,32 @@ This project can serve as a template for new Serverless services - CDK deploymen
2121
[![Twitter Follow](https://img.shields.io/twitter/follow/IsenbergRan?label=Follow&style=social)](https://twitter.com/IsenbergRan)
2222
[![Website](https://img.shields.io/badge/Website-www.ranthebuilder.cloud-blue)](https://www.ranthebuilder.cloud/)
2323

24+
## Getting Started
2425

26+
You can start with a clean service out of this template repository without using the 'Template' button on GitHub.
27+
28+
You can use Cookiecutter.
29+
30+
* Cookiecutter - install with pip/brew ``brew install cookiecutter`` or ``pip install cookiecutter`
31+
32+
Then run:
33+
34+
```
35+
cookiecutter gh:ran-isenberg/cookiecutter-serverless-python
36+
```
37+
38+
Answer the questions to select repo name, service name, etc.:
39+
40+
![logo](https://github.com/ran-isenberg/cookiecutter-serverless-python/blob/main/media/howto.png?raw=true)
41+
42+
43+
**That's it, your developer environment has been set! you are ready to deploy the service:**
44+
45+
```
46+
cd {new repo folder}
47+
poetry shell
48+
make deploy
49+
```
2550

2651
You can also run 'make pr' will run all checks, synth, file formatters , unit tests, deploy to AWS and run integration and E2E tests.
2752

@@ -32,6 +57,7 @@ Starting a Serverless service can be overwhelming. You need to figure out many q
3257
- How to deploy to the cloud? What IAC framework do you choose?
3358
- How to write a SaaS-oriented CI/CD pipeline? What does it need to contain?
3459
- How do you handle observability, logging, tracing, metrics?
60+
- How do you write a Lambda function?
3561
- How do you handle testing?
3662
- What makes an AWS Lambda handler resilient, traceable, and easy to maintain? How do you write such a code?
3763

@@ -49,12 +75,15 @@ This project aims to reduce cognitive load and answer these questions for you by
4975
![design](https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/main/docs/media/design.png?raw=true)
5076
<br></br>
5177

78+
#### **Monitoring Design**
79+
![monitoring_design](https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/main/docs/media/monitoring_design.png?raw=true)
80+
<br></br>
5281
### **Features**
5382

5483
- Python Serverless service with a recommended file structure.
5584
- CDK infrastructure with infrastructure tests and security tests.
5685
- CI/CD pipelines based on Github actions that deploys to AWS with python linters, complexity checks and style formatters.
57-
- CI/CD pipeline deploys to dev/staging and production environment with different gates between each environment
86+
- CI/CD pipeline deploys to dev/staging and production environments with different gates between each environment
5887
- Makefile for simple developer experience.
5988
- The AWS Lambda handler embodies Serverless best practices and has all the bells and whistles for a proper production ready handler.
6089
- AWS Lambda handler uses [AWS Lambda Powertools](https://docs.powertools.aws.dev/lambda-python/).

docs/getting_started.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,25 @@ description: AWS Lambda Cookbook Project Getting started
1010
* [poetry](https://pypi.org/project/poetry/){target="_blank"} - Make sure to run ``poetry config --local virtualenvs.in-project true`` so all dependencies are installed in the project '.venv' folder.
1111
* For Windows based machines, use the Makefile_windows version (rename to Makefile). Default Makefile is for Mac/Linux.
1212

13-
## **Creating a Developer Environment**
13+
## Getting Started
14+
15+
You can start with a clean service out of this template repository without using the 'Template' button on GitHub.
16+
17+
You can use Cookiecutter.
18+
19+
* Cookiecutter - install with pip/brew ``brew install cookiecutter`` or ``pip install cookiecutter`
20+
21+
Then run:
22+
23+
**[`cookiecutter gh:ran-isenberg/cookiecutter-serverless-python`](#){: .copyMe}:clipboard:**
24+
25+
Answer the questions to select repo name, service name, etc.:
26+
27+
![logo](https://github.com/ran-isenberg/cookiecutter-serverless-python/blob/main/media/howto.png?raw=true)
28+
29+
**That's it, your developer environment has been set! you are ready to deploy the service:**
30+
31+
## **Creating a Developer Environment (without cookiecutter)**
1432

1533
1. Run ``make dev``
1634

@@ -68,12 +86,12 @@ Be sure to commit all the changes that ``make pr`` does for you.
6886

6987
CDK requires a requirements.txt in order to create a zip file with the Lambda layer dependencies. It's based on the project's poetry.lock file.
7088

71-
``make deploy` command will generate it automatically for you.
89+
``make deploy`` command will generate it automatically for you.
7290

7391
### dev_requirements.txt
7492

7593
This file is used during GitHub CI to install all the required Python libraries without using poetry.
7694

7795
File contents are created out of the Pipfile.lock.
7896

79-
``make deploy`` ``make deps`` commands generate it automatically.
97+
``make deploy`` and ``make deps`` are commands generate it automatically.

docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ This project aims to reduce cognitive load and answer these questions for you by
2727

2828
- The project deploys an API GW with an AWS Lambda integration under the path POST /api/orders/ and stores orders data in a DynamoDB table.
2929

30+
#### **Monitoring Design**
31+
32+
[<img alt="alt_text" src="./media/monitoring_design.png" />](https://www.ranthebuilder.cloud/)
33+
3034
### **Features**
3135

3236
- Python Serverless service with a recommended file structure.

docs/media/monitoring_design.png

41.4 KB
Loading

0 commit comments

Comments
 (0)