Wednesday, 18 June 2025

How to map application resources and their dependencies

 

Great! Let’s dive deeper into AWS Config's Relationships Tab and AWS Perspective, two of the best AWS-native tools for discovering and mapping application resources and their dependencies.


πŸ” 1. AWS Config → Resources → Relationships Tab

πŸ“Œ What is AWS Config?

AWS Config is a service that continuously records configuration changes to your AWS resources and enables you to:

  • View all resources

  • Understand how resources are connected (e.g., EC2 → Security Group → VPC)

  • Track historical changes

  • Audit compliance over time


🧩 What is the Relationships Tab?

When you select a resource in AWS Config, the "Relationships" tab shows linked resources. For example:

Resource TypeRelationship
EC2 instanceLinked to Security Group, Subnet, IAM Role, EBS Volume
LambdaLinked to IAM Role, Log Group, VPC, Layers
ALBLinked to Target Group, Listener, EC2s

✅ Example:

  • Select an EC2 instance.

  • Click Relationships.

  • You’ll see:

    • Its Security Group

    • Its Subnet/VPC

    • Attached IAM Role

    • EBS Volumes

This helps you reconstruct architecture visually and logically.


πŸ’‘ How to Use:

  1. Go to AWS Console → AWS Config

  2. Click "Resources"

  3. Search or filter by resource type or region

  4. Select a resource → open the "Relationships" tab


πŸ›‘ Limitation:

  • Config must be enabled in advance to see history.

  • Doesn’t visualize architecture like a diagram (use AWS Perspective or CloudMapper for that).


πŸ–Ό️ 2. AWS Perspective – Official Architecture Visualizer

πŸ“Œ What is AWS Perspective?

AWS Perspective is an official AWS solution that:

  • Automatically discovers resources in your account

  • Generates interactive architecture diagrams

  • Helps in understanding applications, dependencies, and regions


🧰 Key Features:

FeatureDescription
Architecture DiagramsAuto-draw diagrams with grouped components
Filtering by Tags or NameFilter view by specific application
Live AWS DataConnects to your AWS account
Cross-account/region ViewOptional multi-account support
Export to PNG/CSVShareable architecture documents

πŸ—️ How it Works:

It uses:

  • CloudFormation stack to deploy the Perspective tool into your account

  • AWS SDKs and APIs to scan services (like EC2, S3, Lambda, RDS)

  • GraphQL + UI frontend to interactively explore


πŸ“¦ What It Deploys:

  • An AppSync GraphQL API

  • Lambda functions for discovery

  • DynamoDB, S3, and Cognito for UI and storage

  • An SPA dashboard to view the architecture


πŸš€ Setup Steps (Short Version):

  1. Go to: AWS Perspective Solution Page

  2. Click "Deploy with CloudFormation"

  3. Select Region and Launch the template

  4. Once deployed, open the URL to access the web UI

  5. Grant necessary IAM permissions for discovery

  6. Let it scan your account — view architecture!


πŸ“Œ Example Use Case:

Imagine you don’t know anything about your app. After deploying Perspective:

  • It scans your account

  • Automatically detects:

    • EC2 → Subnet → VPC

    • Load balancer connected to EC2

    • IAM roles tied to Lambda

  • Draws a full dependency map for you


✅ Pros:

  • No need to install 3rd-party tools

  • Beautiful UI with search and filters

  • Supports multi-region and multi-account

❌ Cons:

  • Requires CloudFormation setup

  • May need IAM permissions (like ReadOnlyAccess, ConfigReadOnly)


🧠 Summary: Config vs Perspective

FeatureAWS ConfigAWS Perspective
Visual Architecture❌ (Textual relationships only)✅ (Diagram-based, interactive)
Real-time Discovery
Dependency Mapping
SetupJust enable ConfigDeploy via CloudFormation
Best ForCompliance, traceabilityApplication/resource visualization

No comments:

Post a Comment