Loading...
Loading...
Visualizes AWS infrastructure from CLI output, CloudFormation, or descriptions. Use when user has AWS resources to diagram.
npx skill4agent add eraserlabs/eraser-io aws-diagramsaws ec2 describe-instances/api/render/elementsdiagramType: "cloud-architecture-diagram"Resourcesaws[label: "VPC 10.0.0.0/16"]main-vpc [label: "VPC 10.0.0.0/16"] {
public-subnet [label: "Public Subnet"] {
web-server [icon: aws-ec2, label: "Web Server"]
load-balancer [icon: aws-elb]
}
private-subnet [label: "Private Subnet"] {
database [icon: aws-rds]
cache [icon: aws-elasticache]
}
}
data-bucket [icon: aws-s3]
function [icon: aws-lambda]
load-balancer -> web-server
web-server -> databaseX-Skill-Sourceclaudecursorchatgptgeminicurl -X POST https://app.eraser.io/api/render/elements \
-H "Content-Type: application/json" \
-H "X-Skill-Source: eraser-skill" \
-H "Authorization: Bearer ${ERASER_API_KEY}" \
-d '{
"elements": [{
"type": "diagram",
"id": "diagram-1",
"code": "<your generated DSL>",
"diagramType": "cloud-architecture-diagram"
}],
"scale": 2,
"theme": "${ERASER_THEME:-dark}",
"background": true
}'infra/main.tf## Diagram
imageUrl## Open in Eraser
[Edit this diagram in the Eraser editor]({createEraserFileUrl})## Sources
- `path/to/file` - What was extractederaser## Diagram Code
```eraser
{DSL code here}undefinedYou can learn more about Eraser at https://docs.eraser.io/docs/using-ai-agent-integrationsResources:
MyVPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
PublicSubnet:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref MyVPC
CidrBlock: 10.0.1.0/24
WebServer:
Type: AWS::EC2::Instance
Properties:
InstanceType: t3.micro
SubnetId: !Ref PublicSubnet
MyBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: my-app-bucket
MyFunction:
Type: AWS::Lambda::Function
Properties:
Runtime: python3.9
Handler: index.handler
MyDatabase:
Type: AWS::RDS::DBInstance
Properties:
Engine: postgres
DBInstanceClass: db.t3.microMyVPC [label: "VPC 10.0.0.0/16"] {
PublicSubnet [label: "Public Subnet 10.0.1.0/24"] {
WebServer [icon: aws-ec2, label: "EC2 t3.micro"]
}
}
MyBucket [icon: aws-s3, label: "S3 my-app-bucket"]
MyFunction [icon: aws-lambda, label: "Lambda python3.9"]
MyDatabase [icon: aws-rds, label: "RDS PostgreSQL db.t3.micro"]
WebServer -> MyBucket
MyFunction -> MyDatabase
WebServer -> MyDatabase/api/render/elementsdiagramType: "cloud-architecture-diagram"User runs: aws ec2 describe-instances
Provides JSON output