Skip to content

This repository provides an AWS CDK multi-account CI/CD pipeline for deploying a serverless image recognition application using AWS Lambda, Amazon S3, and Amazon Rekognition. The pipeline automates deployment across both developer and production environments, utilizing cross-account roles and AWS CodePipeline for seamless integration.

Notifications You must be signed in to change notification settings

amitraikkr/AWS-CDK-Multi-Account-Pipeline-for-Serverless-Image-Recognition-App

Repository files navigation

AWS CDK Multi-Account Pipeline for Serverless Image Recognition with Lambda, S3, and Rekognition

This repository provides a comprehensive guide to setting up a multi-account CI/CD pipeline using AWS CDK for deploying a serverless image recognition application. The project automates infrastructure deployments across development and production environments, ensuring consistency and scalability using AWS services such as Lambda, S3, Rekognition, DynamoDB, and CodePipeline.

Project Overview

The goal of this project is to showcase how to build a multi-account CI/CD pipeline using AWS CDK to manage and deploy resources for an image recognition application. The pipeline integrates with GitHub for source control and deploys Lambda functions, S3 buckets, and DynamoDB tables for processing images using AWS Rekognition.

Key Features

  • Fully automated CI/CD pipeline using AWS CodePipeline and CodeBuild.
  • Serverless image recognition leveraging AWS Rekognition for detecting objects and labels in images.
  • Multi-account setup with deployments to both development and production environments.
  • Cross-account role management for secure deployments between accounts.
  • GitHub integration for source control and continuous deployment.

Architecture Overview

The following AWS services are used in this project:

  • AWS Lambda: Processes images by calling AWS Rekognition for label detection.
  • Amazon S3: Stores the uploaded images and triggers Lambda functions on object creation.
  • Amazon Rekognition: Performs image analysis and detects objects or labels in images.
  • Amazon DynamoDB: Stores the results of the image analysis, such as detected labels.
  • AWS CodePipeline: Manages the CI/CD pipeline for deploying infrastructure and Lambda code.
  • AWS CodeBuild: Builds the application and synthesizes the CDK app for deployment.

Pre-requisites

  • AWS account with sufficient privileges to create and manage resources.
  • CDK toolkit installed (npm install -g aws-cdk).
  • AWS CLI configured on your machine.
  • GitHub account for repository integration.

Installation Instructions

  1. Clone the repository to your local machine:
  2. git clone https://github.com/amitraikkr/AWS-CDK-Multi-Account-Pipeline-for-Serverless-Image-Recognition-App.git
  3. Install dependencies for Lambda function (if needed):
  4. cd lambda && npm install
  5. Install project dependencies:
  6. npm install
  7. Configure AWS credentials:
  8. aws configure
  9. Deploy the resources in your development account:
  10. cdk deploy

Usage

  1. Upload an image to the S3 bucket created by the stack.
  2. Lambda function is triggered to process the image using Rekognition.
  3. Results are stored in DynamoDB, and you can query the detected labels and objects.

Contributing

Contributions are welcome! Please fork this repository and submit a pull request with your improvements.

Follow Me

For more content like this, follow me on:

About

This repository provides an AWS CDK multi-account CI/CD pipeline for deploying a serverless image recognition application using AWS Lambda, Amazon S3, and Amazon Rekognition. The pipeline automates deployment across both developer and production environments, utilizing cross-account roles and AWS CodePipeline for seamless integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published