Complete AWS icon pack for use with Mermaid.js architecture diagrams. Contains 855 AWS icons including services, resources, and categories from AWS Architecture Icons.
This repository provides two icon pack variants:
-
Standard Pack (this repository) - Transparent backgrounds with colored glyphs
- Icons have transparent backgrounds
- Icon shapes are colored (e.g., purple for Analytics, orange for Compute)
- Best for diagrams with custom backgrounds or when you want colored icon shapes
- URL:
https://raw.githubusercontent.com/harmalh/aws-mermaid-icons/main/iconify-json/aws-icons.json
-
Background Pack - Colored tiles with white glyphs (original AWS Architecture Icon style)
- Icons have colored background rectangles (tiles)
- Icon glyphs are white on colored backgrounds
- Matches the original AWS Architecture Icons visual style
- Available on branch
aws-mermaid-icons-with-background(this repository) - URL:
https://raw.githubusercontent.com/harmalh/aws-mermaid-icons/aws-mermaid-icons-with-background/iconify-json/aws-icons.json
Choose the variant that best fits your diagram style!
Migrating from Iconify's
logospack? See the Migration Guide for step-by-step instructions and icon name mappings.
import mermaid from 'mermaid';
mermaid.registerIconPacks([
{
name: 'aws',
loader: () =>
fetch('https://raw.githubusercontent.com/harmalh/aws-mermaid-icons/main/iconify-json/aws-icons.json')
.then((res) => res.json()),
},
]);
mermaid.initialize({ startOnLoad: true });flowchart LR
A[Lambda] --> B[S3]
B --> C[RDS]
A --> D[EC2]
With AWS Icons (architecture-beta syntax):
architecture-beta
group aws-services(aws:aws)[AWS Services] {
service lambda(aws:aws-lambda)[Lambda]
service s3(aws:amazon-simple-storage-service)[S3]
service ec2(aws:aws-ec2)[EC2]
service rds(aws:amazon-rds)[RDS]
}
Note: The
architecture-betadiagram type requires Mermaid v11+ and may not render in GitHub's markdown preview. Use the HTML examples below for full functionality.
Icons use the format (aws:icon-name) in Mermaid diagrams. The naming conventions are:
- AWS Services:
(aws:aws-{service-name})(e.g.,(aws:aws-lambda),(aws:aws-glue)) - Amazon Services:
(aws:amazon-{service-name})(e.g.,(aws:amazon-rds),(aws:amazon-s3)) - Resource Icons:
(aws:{resource-name})(e.g.,(aws:amazon-eventbridge-topic))
Note: In architecture diagrams, icons are specified in parentheses: service name(aws:icon-name)[Label]
- 855 icons including:
- ~300-400 AWS service icons (Arch_*)
- ~200-300 resource icons (Res_*) - e.g., S3 buckets, EventBridge topics
- ~50-100 category/group icons - Architecture categories and groups
- Iconify JSON format - Compatible with Mermaid and Iconify
- SVG sources - Original SVG files included
- All AWS services - Including ones already in Iconify
iconify-json/aws-icons.json- Complete icon pack in Iconify formatsvg/- Source SVG files (for reference/editing)
To rebuild the icon pack from source:
npm run custom:buildThis will:
- Filter icon sizes (optional) - Run
npm run custom:filterfirst to deduplicate icons by size - Scan all SVG files in
Icons/orIcons_filtered/folder - Extract background colors - Captures category colors (e.g., Analytics purple, Compute orange)
- Strip background rectangles - Removes full-coverage rectangles that cause black block rendering
- Apply colors to paths - Replaces white icon paths with category background colors
- Remove empty background groups - Cleans up groups that only contained backgrounds
- Preserve original colors - Keeps AWS brand colors instead of converting to
currentColor - Generate
iconify-json/aws-icons.json - Copy SVG sources to
svg/
Recommended workflow:
npm run custom:filter # Deduplicate icons (keeps preferred sizes)
npm run custom:build # Build standard pack (transparent backgrounds)To build both variants:
npm run custom:build:dual # Builds both standard and background packsTo build background pack only:
npm run custom:build:backgrounds # Builds pack with background tiles preservedThe build process automatically:
- Extracts background colors from AWS Architecture Icons (e.g.,
#8C4FFFpurple for Analytics) - Removes background rectangles that cause black block rendering
- Applies background colors to icon paths (replacing white paths with the category color)
What gets removed:
- Full-coverage rectangles (matching viewBox dimensions)
- Rectangles with background-related IDs (
bg,background,rectangle) - Empty background groups
Color handling:
- Original AWS brand colors are preserved (e.g., Analytics icons are purple
#8C4FFF) - White icon paths are replaced with the category background color
- Icons render with their native AWS colors, not monochrome
Result: Icons have transparent backgrounds with colored icon shapes, matching the visual design of AWS Architecture Icons.
Icons preserve their native AWS colors by default. To override or customize:
Option 1: CSS Override (All Icons)
.mermaid .nodeIcon path {
fill: #ff9900 !important; /* AWS orange */
}Option 2: Per-Category Styling
/* Analytics icons (purple) */
.mermaid .nodeIcon[data-icon-name*="athena"] path,
.mermaid .nodeIcon[data-icon-name*="redshift"] path {
fill: #8C4FFF !important;
}
/* Compute icons (orange) */
.mermaid .nodeIcon[data-icon-name*="ec2"] path,
.mermaid .nodeIcon[data-icon-name*="lambda"] path {
fill: #FF9900 !important;
}Option 3: Monochrome Mode
If you prefer monochrome icons like the logos pack, you can convert all fills to currentColor:
.mermaid .nodeIcon path {
fill: currentColor !important;
}<!DOCTYPE html>
<html>
<head>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
mermaid.registerIconPacks([
{
name: 'aws',
loader: () =>
fetch('https://raw.githubusercontent.com/harmalh/aws-mermaid-icons/main/iconify-json/aws-icons.json')
.then((res) => res.json()),
},
]);
mermaid.initialize({ startOnLoad: true });
</script>
</head>
<body>
<div class="mermaid">
architecture-beta
service lambda(aws:aws-lambda)[Lambda]
service s3(aws:amazon-simple-storage-service)[S3]
</div>
</body>
</html>import { useEffect } from 'react';
import mermaid from 'mermaid';
function MermaidDiagram() {
useEffect(() => {
mermaid.registerIconPacks([
{
name: 'aws',
loader: () =>
fetch('https://raw.githubusercontent.com/harmalh/aws-mermaid-icons/main/iconify-json/aws-icons.json')
.then((res) => res.json()),
},
]);
mermaid.initialize({ startOnLoad: true });
mermaid.contentLoaded();
}, []);
return <div className="mermaid">{diagramCode}</div>;
}The pack includes icons for:
- Compute: EC2, Lambda, ECS, EKS, Fargate, App Runner, etc.
- Storage: S3, EBS, EFS, FSx, Glacier, etc.
- Database: RDS, DynamoDB, DocumentDB, Neptune, etc.
- Networking: VPC, CloudFront, Route 53, API Gateway, etc.
- Security: IAM, KMS, Secrets Manager, Shield, WAF, etc.
- Analytics: Athena, Redshift, EMR, Kinesis, QuickSight, etc.
- AI/ML: SageMaker, Bedrock, Rekognition, Comprehend, etc.
- And 800+ more services and resources
Icons are sourced from AWS Architecture Icons and provided under the AWS Customer Agreement.
This icon pack is provided under the same license as AWS Architecture Icons (AWS Customer Agreement). See AWS Architecture Icons terms for usage guidelines.
To add or update icons:
- Add SVG files to
Icons/folder - Run
npm run custom:build - Commit changes
- Submit pull request
This pack is designed to be hosted on GitHub for easy CDN access:
- Create a new repository:
aws-mermaid-icons - Copy
custom-pack/contents to repository root - Update README with your GitHub username
- Use raw GitHub URLs for loading icons
If you're currently using Iconify's logos pack for AWS icons, see the Migration Guide for:
- Step-by-step migration instructions
- Complete icon name mapping table
- Code examples showing before/after
- Troubleshooting common issues
Problem: Icons appear as solid black rectangles instead of showing the icon shape.
Solution: This was caused by background rectangles in the original AWS icons. The build process now automatically removes these backgrounds. If you're using an older version of the pack:
- Rebuild the pack:
npm run custom:build - Ensure you're using the latest
aws-icons.jsonfrom the repository - Clear your browser cache and reload
Problem: Icons display as a blue square with a question mark.
Causes:
- Icon name doesn't exist in the pack
- Icon pack not registered before diagram rendering
- Network error loading the pack from GitHub
Solutions:
- Check icon name exists: Search
iconify-json/aws-icons.jsonfor the icon name - Register pack before rendering: Ensure
mermaid.registerIconPacks()is called beforemermaid.initialize() - Check network: Verify GitHub raw URL is accessible
Problem: Icons are hard to see due to color contrast.
Solution: Customize icon colors using theme variables or CSS (see "Customizing Icon Colors" section above).
For issues or questions:
- Open an issue on GitHub
- Check Mermaid documentation
- Review Iconify format documentation
- See Migration Guide for help migrating from
logospack