After creating simple Resume with html and css and uploading into S3 with CloudFront tools, here come's the difficult task for creating DynamoDB table, API and Lambda function using Python using SAM (Serverless Application Model).
I spent some time in learning Python and boto3 and how to use both in SAM templates which are in yaml files.
Being first time working on yaml files, it took some time to go through examples and understand the concept.
Then created required assets one by one in SAM Template.
- Dynamo DB: To save the number of visits to my resume site.
- Lambda: A python function to fetch, create and update the visit count into Dynamo DB Table.
- API: Do get the number of visits from Lambda function to avoid direct communication with Dynamo DB from the frontend code.
DynamoDB
Added parameter in the template to get the Tablename in CLI.
And use it in the template to create user defined table name.
Lambda
API Gateway
SAM Stack Creation
API endpoint Created
So till now our Architecture will look like below:
Pending: Set up GitHub Actions to automate build, test and deployment of Code.
Hopefully i will complete it ASAP.
Thank you for reading! 😊
Top comments (0)