
A serverless AWS project that uses a full AWS SAM template. It builds an animal registry API Gateway API for new and born animals. It also uses a Cloudwatch Bus Rule to trigger a Lambda to automate the feeding for animals. Animals are stored in a DynamoDB database, and the animal processing is done through a Step Function with a Map to process the Lambda functions simultaneously.
We were provided set AWS enviornments that were linked to unit tests that determined if our program was working. There were two main tasks, the birth registry and the automation. My team in particular recieved bonus points for being the first to complete the birth registry first. There was a live dashbaord that broadcast the team's points. We finished the entire project in just under the 8 hour time limit.
I was the one of the designated full time employees that got to lead an interns group. I had a lot of fun teaching the interns how to use AWS and helping them work through problems in the hackathon. I assigned them various introductory skills videos and led them to do workshops and get hands on with the tools before the hackathon. For instance, I had them build a basic CRUD API with API Gateway, Lambda, and DynamoDB. As the hackathon went on, I was more comfortable designating tasks and directing the interns. I was better about instructing how to troubleshoot rather than troubleshooting for them. I learned to be more direct in my advice: simple things like making sure they knew the requirements, the overall goal, and how to break them down into digestable tasks. I learned to help them think about architecture flow and to ask the right questions when they're stuck, rather than just saying "it's not working". I hope to take these skills and carry them onto my more senior positions.
brew install aws cli
installs aws cliaws configure
sync with accountbrew tap aws/tap
wrapperbrew install aws-sam-cli
install sam clisam -h
to check if it works
sam init
create sam templatesam validate
validates syntax of templatesam deploy --guided
deploy the sam templatesam sync --stack-name sam-app --watch
sync application to automatically make different udpates depending on saved changessam logs --stack-name sam-app --tail
locally streams all logs to terminal
- register_animal: takes in a list of animals and adds them to a dynamoDB database. If they don't already have a birth date, it assumes they've just been born and gives them a DOB.
- start_step_function: used to initiate the step function from the "registerAll" API route
- test_populate_zoo_registry: initiates some test data to work with in the database
- update_feeding_times: scans the database, if the current floored time matches one of the feeding times, it updates the "lastFed" field for the animals that match. An eventbridge eventbus bus rule triggers this function every hour.
batch processes the animals and uses "map" to call the lambda functions concurrently
curl -X POST https://2dkpi4e09c.execute-api.us-east-1.amazonaws.com/Prod/registerAll \
-H "Content-Type: application/json" \
-d '{
"input": {
"request": {
"animals": [
{
"species": "Elephant",
"feedingSchedule": [
"10:00 AM",
"02:00 PM",
"08:00 PM"
]
},
{
"species": "CAT Lion",
"feedingSchedule": [
"09:00 AM",
"01:00 PM",
"05:00 PM"
]
},
{
"species": "CAT Giraffe",
"feedingSchedule": [
"07:00 AM",
"11:00 AM",
"04:00 PM"
]
}
]
}
},
"inputDetails": {
"truncated": false
}
}'

