Python Script to Clean up Old Images From AWS ECR using Boto3

For one of my projects, I automated building and pushing AWS ECR images using Github Actions, but soon realized that my AWS ECR repo had a pile-up of unused images. In my workflows, I use the most recently image and other images in the repository present a minor opportunity for optimization.

Python Script to Fix "Export EXPORT_NAME cannot be updated as it is in use by STACK_NAME" error in AWS CloudFormation

If you use AWS CloudFormation, you might have encountered an issue while trying to update stacks if the stacks are updated. The error looks something like this: Export EXPORT_NAME cannot be updated as it is in use by STACK_NAME If you use AWS CDK, you might still face issues while deploying stacks, as AWS CDK generates a CloudFormation template during deployment.

Testing a PyTorch machine learning model with pytest and CircleCI

In this tutorial, you will learn how to use PyTorch's torchvision library to build an image classification model and expose the functionality as a REST API using Flask.

How to Serialize Flask SQLAlchemy to JSON

Recently I was involved in developing a PPE response network built by The Luminosity Lab at Arizona State University. Its backend was built using Flask. This was my first time working on a Flask application and I was surprised that it is not trivial to elegantly serialize the database model classes to JSON.

How to add HTTP Cache-Control Headers in Flask

Using caching can vastly improve the performance of your applications. There are different types of caching options available while developing Web applications but HTTP caching is one of the simplest ways to improve the performance of your application.