Md Samad
View GitHub
Cloud / AWS Full-Stack Event-Driven Bioinformatics

NucleusCloud

Cloud-native bioinformatics VCF variant processing pipeline on AWS. Accepts genomic VCF files via presigned S3 upload, processes them asynchronously through SQS/SNS-driven microservices, tiers cold storage to Glacier based on subscription level, and emails results via SES - all behind Globus Auth and Stripe billing. Entire stack deployed from a single CloudFormation template.

1
CloudFormation Template
10
AWS Services
0
Manual Infra Steps
System Design

Architecture

User Browser EC2 INSTANCE · WEB Flask App Jinja2 · REST API · PostgreSQL RDS Globus Auth Federated Identity Stripe Billing · Tiers Amazon S3 Presigned Upload · Storage · Results DynamoDB Job Status · User Metadata SQS Queue SNS Topic Step Functions 1. Validate checksum 2. Process + index 3. Archive to Glacier EC2 INSTANCE · ANN VCF Analyzer SQS-driven · pipeline/ EC2 INSTANCE · UTIL Archiver SNS Notifier SQS · SES Retriever SQS Lambda: Restorer Copies thawed data Glacier → hot S3 AWS SES Email Notifications S3 Glacier Cold Storage · Long-term Archive CloudFormation - S3 · Glacier · SQS · SNS · Lambda · Step Functions · SES · DynamoDB · EC2 · RDS · CloudWatch
End-to-End

How it works

1
EC2 Web - Auth & Tier Check

The Flask app on EC2 Web authenticates researchers through Globus Auth - a federated identity system trusted by institutions like NIH and XSEDE. On login, Stripe resolves the user's subscription tier: Basic (150KB VCF upload limit, aggressive 5-minute Glacier archival) or Premium (unlimited file sizes, indefinite hot S3 preservation). Job state is tracked in DynamoDB throughout.

2
EC2 Web - Presigned S3 Upload

After enforcing the per-tier size limit, Flask generates a presigned S3 URL server-side. The VCF file bytes travel directly from the browser to S3 - the EC2 Web instance never handles file data. This keeps the web server free for API requests regardless of file size, and S3 handles durability and replication automatically.

3
EC2 Ann - VCF Analysis

The S3 upload event enqueues a message in SQS. The VCF Analyzer worker on EC2 Ann polls this queue, picks up the job, and processes the genomic variant file - running analysis and annotation logic from pipeline/. Processed results are written back to S3, and job status is updated in DynamoDB. EC2 Ann scales independently of the web tier.

4
EC2 Util - SNS Fan-out to Archiver & Notifier

Completion triggers an SNS message that fans out to two microservices on EC2 Util. The Archiver receives the SNS event and migrates Basic-tier results to S3 Glacier within 5 minutes; Premium results stay in hot S3. The Notifier polls a separate SQS queue and emails the researcher via SES on success or failure - completely decoupled from the web and analysis tiers.

5
Step Functions Archival Workflow

In parallel, SNS triggers a Step Functions state machine for structured archival - but only for objects that meet the Basic-tier lifecycle policy. Premium-tier objects bypass this flow entirely and remain in hot S3 indefinitely. For Basic-tier objects, the three-stage machine runs: (1) Validate - checksum verification and format validation, (2) Process - indexing and metadata extraction, (3) Archive - cold storage migration to S3 Glacier within 5 minutes. Each stage is independently retryable with exponential backoff.

6
EC2 Util Retriever + Lambda Restorer - On-demand Retrieval

When a researcher requests a previously archived file, the Retriever on EC2 Util polls SQS for retrieval jobs and initiates a Glacier batch retrieval. Once Glacier thaws the data, the Lambda Restorer function fires - it copies the restored bytes back to hot S3 and returns a presigned download URL. The two-service split keeps long-running Glacier polling off Lambda's execution limits.

7
One-Command Infrastructure

All three EC2 instances, IAM roles, S3 buckets, SQS queues, SNS topics, Lambda, Step Functions, DynamoDB tables, and VPC networking are defined in a single CloudFormation template.yaml. LocalStack mirrors the full AWS environment locally via start_all_local.sh. Moto mocks every AWS service call in unit tests, giving full coverage without cloud spend.

Stack

Technologies

Frontend
Flask Jinja2 Bootstrap jQuery
AWS Services
S3 + Glacier SQS SNS Lambda Step Functions SES DynamoDB EC2 Autoscaling CloudWatch
Auth + Billing
Globus Auth Stripe OAuth 2.0
Infrastructure as Code
CloudFormation IAM Roles + Policies
Testing + Local Dev
LocalStack Moto Pytest
Backend
Python 3.9+ Boto3 PostgreSQL RDS REST APIs