@@ -20,70 +20,71 @@ Ensure the following tools are installed:
20
20
## Lab #1
21
21
22
22
1 . Start by cloning this repository:
23
-
24
- ``` bash
25
- git clone git@github.com:56kcloud/serverless-workshop.git
26
- cd serverless-workshop
27
- ```
23
+
24
+ ``` bash
25
+ git clone git@github.com:56kcloud/serverless-workshop.git
26
+ cd serverless-workshop
27
+ ```
28
28
29
29
2 . Create a new branch with your UNIQUE team name:
30
30
31
- ` ` ` bash
32
- git checkout -b < your-unique-team-name>
33
- ` ` `
31
+ ``` bash
32
+ git checkout -b < your-unique-team-name>
33
+ ```
34
34
35
35
3 . Define an environment variable with your team name:
36
36
37
- ` ` ` bash
38
- export TEAM=$( git rev-parse --abbrev-ref HEAD)
39
- ` ` `
37
+ ``` bash
38
+ export TEAM=$( git rev-parse --abbrev-ref HEAD)
39
+ ```
40
40
41
41
4 . Create a virtual Python environment and install dependencies:
42
42
43
- ` ` ` bash
44
- python3.9 -m venv .venv
45
- source .venv/bin/activate
46
- pip install -r requirements-dev.txt
47
- ` ` `
43
+ ``` bash
44
+ python3.9 -m venv .venv
45
+ source .venv/bin/activate
46
+ pip install -r requirements-dev.txt
47
+ ```
48
48
49
49
5 . Run application unit tests:
50
50
51
- ` ` ` bash
52
- python -m unittest tests/test_handler.py
53
- ` ` `
51
+ ``` bash
52
+ python -m unittest tests/test_handler.py
53
+ ```
54
54
55
- Fix the failing tests if any.
55
+ Fix the failing tests if any.
56
56
57
57
6 . Commit
58
58
59
- ` ` ` bash
60
- git commit -a -m " Fixed unit tests"
59
+ ``` bash
60
+ git commit -a -m " Fixed unit tests"
61
+
62
+ ```
61
63
62
64
7 . Push
63
65
64
- ` ` ` bash
65
- git push -u origin < your-unique-team-name>
66
- ` ` `
66
+ ``` bash
67
+ git push -u origin < your-unique-team-name>
68
+ ```
67
69
68
70
8 . Deploy
69
71
70
- Open a browser and navigate to GitHub Actions to see the deployment progress.
72
+ Open a browser and navigate to GitHub Actions to see the deployment progress.
71
73
72
- https://github.com/56kcloud/serverless-workshop/actions
74
+ https://github.com/56kcloud/serverless-workshop/actions
73
75
76
+ When the deployment completes, find the URL of the API you just deployed (look for the "Deploying" step in the workflow output logs), there should be block similar to:
74
77
75
- When the deployment completes, find the URL of the API you just deployed (look for the " Deploying" step in the workflow output logs), there should be block similar to:
78
+ ```
79
+ Outputs:
80
+ ProtectedApiStack.LambdaEndpoint = https://t95f7quxma.execute-api.eu-central-2.amazonaws.com/dev/
81
+ ```
76
82
77
- ` ` `
78
- Outputs:
79
- ProtectedApiStack.LambdaEndpoint = https://t95f7quxma.execute-api.eu-central-2.amazonaws.com/dev/
80
- ` ` `
83
+ and copy/paste the url in a new browser window. You should see the following message:
81
84
82
- and copy/paste the url in a new browser window. You should see the following message:
83
-
84
- ` ` `
85
- {" message" : " Welcome to the API <your-unique-team-name>!" }
86
- ` ` `
85
+ ```
86
+ {"message": "Welcome to the API <your-unique-team-name>!"}
87
+ ```
87
88
88
89
🎉 Congratulations! You have deployed a Python API to the cloud using infrastructure-as-code and automation.
89
90
@@ -94,3 +95,5 @@ We welcome contributions to this project! Please fork the repository and submit
94
95
## License
95
96
96
97
This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
98
+
99
+ Test
0 commit comments