You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+10-9
Original file line number
Diff line number
Diff line change
@@ -162,6 +162,7 @@ The content can be accessed through each specific README link below.
162
162
- AWS ECS (Elastic Container Service)
163
163
- AWS ECR (Elastic Container Repository)
164
164
- AWS Fargate
165
+
- AWS SSM - Parameter Store
165
166
- IaC - Terraform
166
167
- Project #1 Kick-off
167
168
-[Class 05](classes/05class/README.md)
@@ -171,24 +172,25 @@ The content can be accessed through each specific README link below.
171
172
- CI/CD Concepts
172
173
- GitHub Actions
173
174
- AWS CloudWatch
175
+
- AWS KMS (Key Management Service)
174
176
-[Class 06](classes/06class/README.md)
175
177
- Project #1 Delivery
176
178
- Serverless introduction
177
-
- AWS Lambda
178
179
- AWS API Gateway
179
-
- Project #2 Kick-off
180
-
-[Class 07](classes/07class/README.md)
180
+
- AWS Lambda
181
181
- AWS DynamoDB
182
-
- AWS KMS (Key Management Service)
183
-
- AWS SSM - Parameter Store
182
+
-[Class 07](classes/07class/README.md)
183
+
- Serverless integration patterns
184
+
- AWS DynamoDB Streams
184
185
- AWS SNS
185
186
- AWS SQS
187
+
- AWS S3 Events
188
+
- AWS CloudWatch Events (EventBridge)
186
189
-[Class 08](classes/08class/README.md)
187
-
-Project #2 Delivery
190
+
-AWS Certifications
188
191
- Next steps
189
192
- Course Closure
190
193
191
-
192
194
## Exercises
193
195
194
196
We highly recommend doing the exercises from this repository. However, you will first need to raise a Pull Request from a [fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) to add yourself permission to push branches.
@@ -321,7 +323,7 @@ make dashboard \
321
323
322
324
## Presentation format
323
325
324
-
* We are using plain README.md files with markdown or [GitPitch](https://gitpitch.com/docs/markdown-features/basics/) for slideshow presentations
326
+
* We are using plain `README.md` files with markdown or [GitPitch](https://gitpitch.com/docs/markdown-features/basics/) for slideshow presentations
325
327
326
328
* Generate the presentation by running:
327
329
*`make presentation`
@@ -334,7 +336,6 @@ make dashboard \
334
336
* Offline: use a [Docker container](https://github.com/kns-it/Docker-GitPitch/), run `make presentation` and `open http://localhost:9000/${ORG_NAME}/${REPO_NAME}/${BRANCH_NAME}?p=${FOLDER_NAME}`
335
337
For running in a specific folder: `FOLDER_NAME=class2 make presentation`
336
338
337
-
338
339
## Clean up Ready to Review tag from Closed PRs
339
340
340
341
To clean up the `Read to Review` tags of the closed PRs, the below make target can be executed.
Copy file name to clipboardexpand all lines: classes/04class/ssm/README.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,11 @@ This class is an introduction to AWS System Manager.
3
3
The main goal is to explain the purpose, the benefits and how to use it.
4
4
5
5
***Contents***
6
-
-[What is AWS SSM?](#what-is-aws-ssm)
7
-
-[SSM Parameter Store](#ssm-parameter-store)
8
-
-[Main Use cases](#main-use-cases)
6
+
-[System Manager](#system-manager)
7
+
- [What is AWS SSM?](#what-is-aws-ssm)
8
+
- [SSM Parameter Store](#ssm-parameter-store)
9
+
- [Main use cases](#main-use-cases)
10
+
- [Appendix](#appendix)
9
11
10
12
## What is AWS SSM?
11
13
AWS Systems Manager is an AWS service that you can use to view and control your infrastructure on AWS. Using the Systems Manager console, you can view operational data from multiple AWS services and automate operational tasks across your AWS resources.
Copy file name to clipboardexpand all lines: classes/06class/exercises/c06-serverless01/ANSWER.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,4 @@
13
13
<!-- Don't change anything below this point-->
14
14
<!-- Before commiting, remove both commented lines-->
15
15
***
16
-
Answer for exercise [c06-serverless01](https://github.com/devopsacademyau/academy/blob/cdbf8008dd42eacd5aa6f43f66b152e8f91d0e78/classes/06class/exercises/c06-serverless01/README.md)
16
+
Answer for exercise [c06-serverless01](https://github.com/devopsacademyau/academy/blob/22bc97543c8193afc157cb3bc12e876d642c75ac/classes/06class/exercises/c06-serverless01/README.md)
Copy file name to clipboardexpand all lines: classes/06class/exercises/c06-serverless01/README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# Creating a POST API using API Gateway, Lambda and DynamoDB
2
2
3
-
For this exercise you will create a POST API for creating a record in the database using APIs. This is a common scenario that we see in several software projects.
3
+
For this exercise you will create a POST API for creating a record in DynamoDB using API Gateway and Lambda. This is a common use case that we've seen in several software projects.
4
4
5
5
For that you will use:
6
6
- AWS API Gateway, Lambda, DynamoDB, KMS, SSM
7
7
- Terraform for IaC
8
8
- 3 Musketeers
9
9
10
-
**IMPORTANT**: copy the files [src/](./src) folder to your exercise folder under your user name. You will use them as a base to develop the solution.
10
+
**IMPORTANT**: copy the files [src/](./src) folder to your exercise folder under your user name in the exercises folder (example `exercises/c06-serverless01/<username>/src`). You will use them as a base to develop the solution.
11
11
12
12
Requirements:
13
13
@@ -18,11 +18,11 @@ Requirements:
18
18
1. You need to create a public REST API that will expose the following endpoints:
19
19
1.`POST /customers`: For creating a new customer in the database.
20
20
2. API Gateway: All resources will have Proxy integration with Lambda
21
-
3. Authentication: Use API Key to protect your API. Push the value of the API key to SSM parameter store after creation.
22
-
3.**Lambda**:
21
+
3. Authentication: Use API Key to protect your API. Push the value of the `API key` to `SSM parameter store` after creation. Do not store secrets in your source code.
22
+
3.**Lambda**:
23
23
1. Source code is provided for you in Python (it is in the `src/lambda.zip`). Check it in [src/ folder](./src). You will point to this zip file in your terraform Lambda resource.
24
24
2. This lambda will have an environment variable called `DB_NAME`. Make sure the value for this variable is fetched from SSM Parameter Store for deployment.
25
-
3.*Tip: Lambda permissions: Lambda will need `dynamodb:PutItem` access*. Lambda will also need to grant invokeFunction permission to the API Gateway.
25
+
3.*Tip: Lambda permissions: Lambda will need `dynamodb:PutItem` access*. Lambda will also need to grant `invokeFunction` permission to the API Gateway.
26
26
4.**SSM Parameter store**: Use parameter store to store and retrieve the value of `DB_NAME` in your 3 Musketeers scripts.
27
27
5.**KMS Key**: Create a new key used for encrypting the DynamoDB table.
28
28
1.*Tip: lambda will require access to Encrypt the data using this key. This needs to be described in the KMS Key policy.*
-[`terraform/main.yaml`](terraform/main.yaml): terraform code for all resources
7
+
-[`src/photo_handler.py`](src/): Lambda for handling S3 event (the lambda DOES NOT need to be Python, you can use other languages)
8
+
-[`src/report_customers_count.py`](src/): Lambda for consuming from DDB stream and calling SNS (the lambda DOES NOT need to be Python, you can use other languages)
9
+
-[`docker-compose.yaml`](docker-compose.yaml): part of 3M
-[docker-compose.yaml](docker-compose.yaml): part of 3M implementation
12
+
13
+
> Solution might contain other files than the ones listed above.
14
+
15
+
## Comments and Challenges faced
16
+
17
+
> List here any challenges faced and how you solved them
18
+
19
+
20
+
<!-- Don't change anything below this point-->
21
+
<!-- Before commiting, remove both commented lines-->
22
+
***
23
+
Answer for exercise [c07-serverless02](https://github.com/devopsacademyau/academy/blob/b06b4cc323b9349d904562e45551c22974928952/classes/07class/exercises/c07-serverless01/README.md)
> Use as base for this exercise your solution for the exercise from the last class (API gateway -> Lambda -> DynamoDB).
4
+
5
+
**Requirements**:
6
+
- the name of the image is the email address of the user (to keep codification simpler)
7
+
- Using a new Lambda (you need to create it) triggered by the S3 object creation, update the DynamoDB Table you created in the previous exercise to store the photo location path (S3 prefix) new attribute `photo_location` for that user by email address.
8
+
- Example:
9
+
- If I upload the file PNG `[email protected]` to the S3 bucket `s3://mycustomersphotos`, then the Item in DDB for the email address `[email protected]` needs to update the attribute `photo_location` to `[email protected]`
10
+
- Also, in the previous lambda, if the update was successful, send an email (SES) to the user saying "Thanks for adding your awesome photo :)"
11
+
12
+
- As soon as a new customer is created in the DynamoDB Table, stream it (DDB Streams) and send a report message by email (SNS) to the admin email (your email here) saying "Number of records: X", where X is the number of customers in the table
13
+
14
+
15
+
At this stage you probably already have this:
16
+
17
+

18
+
19
+
Target state:
20
+
21
+

22
+
23
+
## Submit a PR with the following files:
24
+
25
+
- README.md based on the [ANSWER.md file](ANSWER.md) with a link to the following files from your answer (the actual solution may have more files):
26
+
-`terraform/main.yaml`: terraform code for all resources
27
+
-`src/photo_handler.py`: Lambda for handling S3 event (the lambda DOES NOT need to be Python, you can use other languages)
28
+
-`src/report_customers_count.py`: Lambda for consuming from DDB stream and calling SNS (the lambda DOES NOT need to be Python, you can use other languages)
29
+
-`docker-compose.yaml`: part of 3M
30
+
-`Makefile`: 3 Musketeers implementation
31
+
- In the `README.md` file include details on the execution
> Solution might contain other files than the ones listed above.
11
+
12
+
## Command Execution Output
13
+
14
+
<!-- Don't change anything below this point-->
15
+
<!-- Before commiting, remove both commented lines-->
16
+
***
17
+
Answer for exercise [c07-serverless02](https://github.com/devopsacademyau/academy/blob/b06b4cc323b9349d904562e45551c22974928952/classes/07class/exercises/c07-serverless02/README.md)
- If an EC2 instance is running and is not tagged with `CostCentre` (any value), terminate it and notify subscribed admins via a SNS topic that has only your email subscribed.
5
+
6
+
Tips:
7
+
- Solution will include a Cloudwatch event rule (see below) and a Lambda ([check the ./src folder](../c07-serverless02/src/))
8
+
9
+

10
+
11
+
Sample CloudWatch Event rule:
12
+
```json
13
+
{
14
+
"source": [
15
+
"aws.ec2"
16
+
],
17
+
"detail-type": [
18
+
"EC2 Instance State-change Notification"
19
+
],
20
+
"detail": {
21
+
"state": [
22
+
"running"
23
+
]
24
+
}
25
+
}
26
+
```
27
+
28
+
## Submit a PR with the following files:
29
+
- README.md based on the [ANSWER.md file](ANSWER.md) with a link to the following files from your answer (the actual solution may have more files):
30
+
-`main.tf`: terraform code for all resources
31
+
-`docker-compose.yaml`: part of 3M
32
+
-`Makefile`: 3 Musketeers implementation
33
+
- In the `README.md` file include details on the execution of the test below:
0 commit comments