Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add diagram of resources deployed in AWS #91

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ $ go install github.com/storacha/indexing-service/cmd@latest

## Deployment

> [!TIP]
> Take a look at the [infrastructure diagram](docs/infra.md) for an overview of what gets deployed.

Deployment of this service to AWS is managed by terraform which you can invoke with `make`.

First, install OpenTofu e.g.
Expand Down
64 changes: 64 additions & 0 deletions docs/infra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
```mermaid
graph TB
%% VPC and Networking
VPC[VPC<br/>10.0.0.0/16] --> PublicSubnets[Public Subnets]
VPC --> PrivateSubnets[Private Subnets]
PublicSubnets --> IGW[Internet Gateway]
PublicSubnets --> NAT[NAT Gateways]
NAT --> PrivateSubnets

%% API Gateway
APIGW[API Gateway v2<br/>HTTP API] --> Lambda
APIGW --> CustomDomain[Custom Domain<br/>*.indexer.storacha.network]
CustomDomain --> Route53[Route53<br/>DNS Zone]
CustomDomain --> ACM[ACM Certificate]

%% Lambda Functions
subgraph Lambda[Lambda Functions]
GETroot
GETclaim
GETclaims
POSTclaims
notifier
providercache
remotesync
end

%% Event Sources
EventBridge[EventBridge<br/>Scheduler] --> notifier
SNSTopic[SNS Topic<br/>Head Changes] --> remotesync
SQSQueue[SQS Queue<br/>Caching.fifo] --> providercache
SQSQueue --> SQSDLQueue[Dead Letter Queue]

%% Storage
Lambda --> DynamoDB
subgraph DynamoDB[DynamoDB Tables]
metadata
chunk_links
legacy_claims
legacy_block_index
end

Lambda --> S3
subgraph S3[S3 Buckets]
caching
ipni_store
notifier_head
claim_store
legacy_claims_bucket
end

%% Cache
Lambda --> ElastiCache
subgraph ElastiCache[Redis Serverless]
providers
indexes
claims
end

%% Parameters
Lambda --> SSM[SSM Parameter Store<br/>Private Key]

%% Security
SecurityGroup[Security Group<br/>Lambda] --> CacheSecurityGroup[Security Group<br/>Redis]
```
Loading