Architecture Recipes

목차

Web/App Development

Container

Analytics

Machine Learning

Generative AI

SaaS

Web/App Development

Web Frontend - S3

S3를 사용해서 간단하면서도 강력한 정적 웹 호스팅 환경을 구성할 수 있습니다. S3에 정적 웹 파일을 업로드하고 몇 가지 설정만 하면, 추가비용 없이 트래픽에 따라 자동으로 확장되며 높은 가용성을 갖는 웹 호스팅 환경이 구성됩니다. S3는 S3 prefix 단위로 GET/HEAD 요청에 대해서는 5,500 rps, PUT/COPY/POST/DELETE 요청은 3500 rps 를 지원합니다. 하나의 S3 안에서 에서 생성할 수 있는 prefix에는 제한이 없으므로, 더 높은 트래픽을 처리하기 위한 구성이 가능합니다.

또한 Github, AWS CodeCommit 에 있는 코드를 Github Action, AWS CodePipeline 을 통해서 CICD 환경을 구성해서 사용하면 보다 안전한 배포 환경을 만들 수 있습니다.

Web Frontend - Amplify Hosting

Amplify 호스팅 환경을 사용하면 보다 간단히 웹 호스팅 환경을 구성할 수 있습니다. 정적 웹 페이지 뿐 아니라 SSR 형태의 서비스 환경도 자동으로 구성됩니다. 예를들어 next.js 기반으로 SSR 애플리케이션을 배포하기 위한 환경을 구성할 수 있습니다.

영상으로 이해하기: https://youtu.be/pJvBlfgHaEo

Web/App Frontend - Amplify Studio

Amplify Studio 에서 제공하는 기능을 사용하면, 데이터 모델을 설계해서 GraphQL 스키마를 생성하고, Figma 와 연동해서 UI 디자인을 가져와 데이터 모델에 매핑하는 형태로 UI 및 데이터 매핑을 편리하게 구성할 수 있고, 이를 React 등의 클라이언트 환경을 위한 프레임워크 코드로 생성해서, UI 개발을 위한 boilerplate 코드 작성 노력을 크게 줄이며 프론트 개발의 생산성을 향상 시킬 수 있습니다.

영상으로 이해하기: https://youtu.be/pJvBlfgHaEo

Backend - 기본 구성 - EC2, ELB, AutoScalingGroup

전통적인 백엔드 서비스 구성입니다. Auto Scaling이 적용된 EC2를 컴퓨팅 리소스로 사용하고 ELB를 통해 요청을 받아서 EC2 인스턴스에 분배합니다. 위 구성은 트래픽에 따라 EC2가 자동으로 확장되고, AWS CodeDeploy를 통해 Rolling 또는 Blue/Green 배포를 구성할 수 있습니다.

Backend - 서버리스 구성 - API Gateway, Lambda

서버리스 형태의 백앤드 기본 구성입니다. API Gateway에서 요청을 받아서 해당 요청처리를 위한 Lambda 함수를 호출해서 요청을 처리합니다. 완전한 서버리스 구성으로 서버의 확장, 서버 보안에 대한 관리 비용을 많이 낮출 수 있습니다. 또한 사용한 만큼만 비용을 지불하기 때문에 특히 서비스 초기 트래픽이 적은 경우, 로직의 복잡도가 낮은 경우에 보다 잘 적용할 수 있습니다. 이 구성은 DB로 Key-Value 저장소인 DynamoDB를 사용하는 경우가 많고, RDS Proxy를 통해서 RDS, Aurora에 연결해서 이용할 수 있습니다. AWS 서버리스 개발 프레임워크인 SAM(Serverless Application Model)를 사용하면 보다 생산적으로 개발/배포할 수 있습니다. API 요청에 따른 비지니스 흐름은 AWS StepFunctions를 통해서 조직화 할 수 있습니다. 비즈니스 로직이 복잡해지거나 DB 요청 시간이 길어지면 이 아키텍처가 최적인지 검토가 필요할 수 있습니다.

Backend - GraphQL - AppSync

AppSync는 GraphQL API를 쉽게 개발할 수 있는 서버리스 서비스 입니다. 요청량에 따라서 자동으로 스케일링되고 이를 위해 관리할 필요가 없습니다. 성능 향상을 위해 캐시를 추가하거나, 실시간 업데이트를 지원하기 위한 구독을 설정하거나, 쉽게 오프라인 클라이언트를 동기화하기 위한 환경을 구성할 수 있습니다. 데이터저장소로는 DynamoDB와 잘 붙어서 동작하고 Amazon Aurora, OpenSearch, Lambda, HTTP 등과 연동할 수 있습니다.

Backend - Amplify

Amplify 에서는 프론트앤드/모바일 개발자가 편리하게 백앤드를 개발하기 위한 환경 및 도구를 제공합니다. GraphQL API, REST API 를 생성할 수 있고 이를 여러 데이터 서비스 제품 및 Lambda 등과 통합할 수 있습니다. 또한 인증 서비스인 Cognito와 쉽게 통합할 수 있습니다. Amplify Studio 및 Amplify CLI를 통해 편리하게 환경을 다룰 수 있습니다. Amplify의 백앤드 기능 뿐 아니라, Amplify 전체적인 기능을 함께 사용해서 보다 빠르게 AWS 기반의 웹, 모바일 애플리케이션을 만들 수 있습니다.

영상으로 이해하기: https://youtu.be/pJvBlfgHaEo

Containers

Cluster creation using AWS CDK best practice

Data Analytics

Build Business Intelligence System from Scratch on AWS

Describes the concepts of lambda architecture and the actual deployment process with an example of building a serverless business intelligence systems using Amazon Kinesis, S3, Athena, OpenSearch Service, and QuickSight.

CDC(Change Data Capture) Data Pipeline

Data Pipeline for CDC data from MySQL DB to Amazon OpenSearch Service through Amazon Kinesis using Amazon Data Migration Service(DMS).

CDC(Change Data Capture) Data Pipeline using Amazon MSK and MSK Connect with Debezium

Data Pipeline for CDC data from MySQL DB to Amazon S3 through Amazon MSK using Amazon MSK Connect (Debezium)

CDC(Change Data Capture) Data Pipeline using Amazon MSK Serverless and MSK Connect with Debezium

Data Pipeline for CDC data from MySQL DB to Amazon S3 through Amazon MSK Serverless using Amazon MSK Connect (Debezium)

Transactional Data Lake supporting CDC-based Upsert operation

Stream CDC into an Amazon S3 data lake in Apache Iceberg format with AWS Glue Streaming and DMS

Transactional Data Lake using Amazon MSK and Apache Iceberg on AWS Glue

Stream CDC into an Amazon S3 data lake in Apache Iceberg format with AWS Glue Streaming using Amazon MSK and MSK Connect (Debezium)

Transactional Data Lake using Amazon MSK Serverless and Apache Iceberg on AWS Glue

Stream CDC into an Amazon S3 data lake in Apache Iceberg format with AWS Glue Streaming using Amazon MSK Serverless and MSK Connect (Debezium)

Streaming Data Pipeline from Apache Kafka to Amazon S3 using Amazon Kinesis Data Firehose

Streaming data pipeline to continuously load data from an Amazon MSK or MSK Serverless cluster to Amazon S3 using Amazon Kinesis Data Firehose.

Redshift Streaming ingestion from Kinesis Data Streams, MSK, or MSK Serverelss (3 examples)

This is a collecton of CDK projects to show how to load data from streaming services into Amazon Redshift.

OpenSearch Serverless 4 Common Usage Patterns

Typical use cases of opensearch serverless: search, time-series, kinesis firehose integration, securing with VPC

  • (1) Search

  • (2) Time-series Log Analysis

  • (3) Streaming Ingestion through Kinesis Firehose

  • (4) Securing OpenSearch Serverless with VPC

Web Analytics System on AWS (a kind of Simple version of Google Analytics)

This web analytics demo shows how to collect web logs with API Gateway and store them into S3 through Amazon Kinesis. Then this project shows how to analyze web logs with Amazon Athena.

AWS Glue Streaming ETL example with Apache Iceberg

Streaming ETL job cases in AWS Glue to integrate Iceberg and creating an in-place updatable data lake on Amazon S3

AWS Glue Streaming Ingestion from Kafka to Apache Iceberg table in S3

This is a collecton of Amazon CDK projects to show how to directly ingest streaming data from Amazon Mananged Service for Apache Kafka (MSK) and MSK Serverless into Apache Iceberg table in S3 with AWS Glue Streaming.

AWS Glue Streaming ETL example with Delta Lake

Streaming ETL job cases in AWS Glue to integrate Delta Lake and creating an in-place updatable data lake on Amazon S3

Building CQRS Pattern using Amazon Athena

Example of CQRS(Command and Query Responsibility Segregation) Pattern using Amazon Athena

Streaming Count Sketches with HyperLogLog in Amazon MemoryDB for Redis

This repository provides you cdk scripts and sample code on how to count unique items (e.g., unique visitors) with hyperloglog in Amazon MemoryDB for Redis. HyperLogLog (HLL) is a probabilistic data structure that estimates the cardinality of a set. As a probabilistic data structure, HyperLogLog trades perfect accuracy for efficient space utilization.

Real-time Image Analysis System

This sample project is a real-time image analysis system. As an image is uploaded, the real-time image analysis system annotates tags on the image using Amazon Rekognition and ingests image tags into Amazon Elasticsearch for analyzing image labels.

Machine Learning

Building People You May Know (PYMK) Recommendation using Amazon Neptune and Textract

Business card management & social network analysis system

building a visual search application using Amazon SageMaker and Amazon Elasticsearch

Deep Visual Search Lab

Creating a visual search application using Amazon SageMaker and Amazon OpenSearch Service

Improve Search Relevance with Machine Learning in Amazon OpenSearch Service

This repository guides users through creating a semantic search using Amazon SageMaker and Amazon Elasticsearch service

Vector-Based Semantic Search using Amazon OpenSearch Service

Creating a vector-based semantic text search with Amazon SageMaker and OpenSearch K-NN Algorithms

Generative AI

RAG(Retrieval Augmented Generation) with LLMs and Amazon Kendra

This project is a Question Answering application with Large Language Models (LLMs) and Amazon Kendra. An application using the RAG(Retrieval Augmented Generation) approach retrieves information most relevant to the user’s request from the enterprise knowledge base or content, bundles it as context along with the user’s request as a prompt, and then sends it to the LLM to get a GenAI response.

RAG(Retrieval Augmented Generation) with Amazon Bedrock and Kendra

This project is a Question Answering application with Large Language Models (LLMs) and Amazon Kendra. An application using the RAG(Retrieval Augmented Generation) approach retrieves information most relevant to the user’s request from the enterprise knowledge base or content, bundles it as context along with the user’s request as a prompt, and then sends it to the LLM to get a GenAI response.

RAG(Retrieval Augmented Generation) with Amazon Bedrock and OpenSearch

RAG(Retrieval Augmented Generation) with LLMs and Amazon OpenSearch

This project is an Question Answering application with Large Language Models (LLMs) and Amazon OpenSearch Service. An application using the RAG(Retrieval Augmented Generation) approach retrieves information most relevant to the user’s request from the enterprise knowledge base or content, bundles it as context along with the user’s request as a prompt, and then sends it to the LLM to get a GenAI response.

RAG(Retrieval Augmented Generation) with LLMs and Amazon OpenSearch Serverless

Question Answering Generative AI application with Large Language Models (LLMs) and Amazon OpenSearch Serverless Service

RAG(Retrieval Augmented Generation) with LLMs and Amazon Aurora Postgresql using pgvector

This project is a Question Answering application with Large Language Models (LLMs) and Amazon Aurora Postgresql using pgvector. An application using the RAG(Retrieval Augmented Generation) approach retrieves information most relevant to the user’s request from the enterprise knowledge base or content, bundles it as context along with the user’s request as a prompt, and then sends it to the LLM to get a GenAI response.

RAG(Retrieval Augumented Generation) with Amazon Bedrock and MemoryDB for Redis

Question Answering Generative AI application with Large Language Models (LLMs), Amazon Bedrock, and Amazon MemoryDB for Redis.

RAG(Retrieval Augumented Generation) with Amazon Bedrock and DocumentDB

Question Answering Generative AI application with Large Language Models (LLMs), Amazon Bedrock, and Amazon DocumentDB (with MongoDB Compatibility)

Semantic Vector Search in PostgreSQL using Amazon SageMaker and pgvector

This project is a search solution using pgvector for an online retail store product catalog. We’ll build a search system that lets customers provide an item description to find similar items. For more information, check this blog post, Building AI-powered search in PostgreSQL using Amazon SageMaker and pgvector (on MAY 2023)

SaaS

SaaS Metering System Reference Architecture

This project shows how to implement a simple SaaS metering system on AWS

Last updated