Posts

Showing posts from February, 2025

Building and Deploying a Fargate Container that runs Python and performs CloudWatch Logging

Image
This guide walks you through building and deploying an AWS Fargate container that runs a Python script. The container will be tagged as the latest version, pushed to Amazon Elastic Container Registry (ECR), and configured to log messages to CloudWatch Logs. The process includes setting up the Dockerfile, creating the Python script, building and pushing the Docker image, and configuring AWS services to ensure your container runs smoothly on Fargate. By the end of this tutorial, you will have a running Fargate service that logs information to CloudWatch Logs, allowing you to monitor the status and output of your containerized application in real time. NOTE - In this guide, when you see aws_account_id replace it with your AWS account number and region with your AWS region.  Step-by-Step Guide Overview Setting up the Dockerfile Define a Dockerfile that uses Amazon Linux 2023 as a base image, installs Python, sets up the environment, and configures the CloudWatch logging agent. Wri...

Setting up an AWS Cognito User Pool and building a React login component

Image
Setting up an AWS Cognito User Pool and building a React login component involves several steps. After you follow this guide, you will have a React component that lets a user log into the application using AWS Cognito. Setting Up AWS Cognito User Pool Log in to AWS Management Console and navigate to the Amazon Cognito service. Click on "Create a User Pool". Provide a name for your user pool. Configure Sign-in Options. Choose Username as the primary method of user identification. Optionally, allow email and/or phone numbers as aliases. Configure Password Policy. Define the minimum length and strength (e.g., uppercase, numbers, special characters). Enable Multi-Factor Authentication (MFA) if needed. Choose User Attributes like email or phone number to store additional user information. Configure App Clients In the User Pool, go to the "App clients" section and create a new app client. Disable secret generation for public clients like a React app....