Posts

Deploying an n8n AI Chatbot Agent on AWS ECS with Amazon Bedrock

Image
Deploying an n8n AI Chatbot Agent on AWS ECS with Amazon Bedrock Table of Contents 1. Introduction 2. System Architecture 3. Load Balancer Creation 4. ECS Cluster and Service 5. Bedrock and IAM User 6. n8n Agent Setup 7. Conclusion 1. Introduction N8n is a popular workflow automation tool renowned for its robust integration capabilities and built-in AI features. This article provides step-by-step guidance on constructing a self-hosted AI chatbot agent by leveraging n8n in conjunction with Amazon Bedrock's AI models. We will containerize the application using AWS Elastic Container Service (ECS), ensuring scalability, reliability, and cost-effectiveness. 2. System Architecture The system is designed to ensure high availability, efficient traffic management, and seamless integration of AI-driven workflows. Below are the key components and their roles in the architecture: Application Load Balancer (ALB): Rou...

Building a RAG-Based Chatbot with Amazon Bedrock, React and Lambda (PART 2)

Image
Building a RAG-Based Chatbot with Amazon Bedrock, React, and Lambda (PART 2) Table of Contents A. Introduction B. Background C. Backend Chatbot API D. Frontend Chatbot Application E. Deploy React Application to S3 F. Resulting Application G. Conclusion A. Introduction In the previous article , we built a RAG (Retrieval-Augmented Generation) agent using Amazon Bedrock . The agent answers customer queries about training courses by combining static information from a CSV file (stored in the Bedrock Knowledge Base) and real-time course status from DynamoDB . In this second part, we will: Build a backend REST API using Python Lambda to invoke the Bedrock RAG agent. Develop a frontend chatbot application using React and the React Chatbotify component. Host the React application as a static website on S3 . Integrate the frontend and backend using API Gateway . Provide full code...

Building a RAG-Based Training Center Assistant with Amazon Bedrock and Pinecone (PART1)

Image
Building a RAG-Based Training Center Assistant with AWS Bedrock and Pinecone Table of Contents Introduction Background Architecture Overview Step-by-Step Implementation A. Create Pinecone API Key B. Create Pinecone Index C. Store Pinecone API Key in AWS Secrets Manager D. Create Bedrock Knowledge Base E. Create Lambda Function for the Agent to access DynamoDB table F. Create S3 Bucket and Upload OpenAPI Schema G. Create Bedrock Agent H. Create Resource based Policy for Lambda function Conclusion Introduction In this article, I will guide you through building a Retrieval-Augmented Generation (RAG) application using AWS Bedrock , Pinecone , and Amazon Titan Text G1 - Premier Model. We will create a Training Center Assistant Chatbot capable of answering customer queries about training course...

Guide to Deploy Multiple WordPress Sites on EC2 with Podman

Image
Deploying Multiple WordPress Sites on EC2 Using Podman: Step-by-Step Guide Table of Contents Background Possible Architecture Setup EC2 and Podman Creating Configuration Files for WordPress and MySQL Creating Podman Compose File and Environment Variables Testing and installation of Wordpress Setting Up ACM (AWS Certificate Manager) Setting Up ALB (Application Load Balancer) Setting Up Security Group for the EC2 Conclusion and Summary 1. Background Podman is a lightweight, open-source container management tool that runs containers without a background daemon. Its efficiency and security make it ideal for deploying containerized applications on AWS EC2. It is especially good for small to medium-sized enterprises (SMEs) seeking a cost-effective solution. In this guide, I’ll use Podman to deploy multiple WordPress sites on an Ubuntu EC2 instance. Reasons to Use Podman...

Installing Code-server with EC2 and Podman (integrate with Cognito) (PART 2)

Image
Integrating Amazon Cognito User Pool with Code-Server on EC2 and Podman (PART 2) Table of Contents 1. Background 2. Proposed Solution: Integrating Amazon Cognito 3. Architecture Diagram 4. Create Cognito User Pool 5. Setup ALB 6. Testing of Setup 7. Other Useful AWS Services 8. Conclusion and Summary 1. Background In a previous article , I walked through the installation of code-server on an EC2 instance using Podman . While this setup is functional, it has some significant drawbacks when it comes to security: Single Password Authentication : The code-server relies on a single password stored in a configuration file. This is not a secure or scalable method to manage authentication. Lack of Multi-Factor Authentication (MFA) : The setup does not support MFA, increasing the risk of unauthorized access. Limited Security Controls : Advanced security features such as user ma...