from diagrams import Diagram
from diagrams.aws.compute import Lambda
from diagrams.aws.database import DynamodbTable
from diagrams.aws.integration import SNS
from diagrams.aws.network import APIGateway

with Diagram("User Profile", show=False, direction="TB"):

    userprofile = Lambda("user profile")
    # topic = SNS("user profile")

    APIGateway("user profile api") >> userprofile >> DynamodbTable("user profiles") >> userprofile
    # userprofile >> topic
from diagrams import Diagram
from diagrams.aws.compute import Lambda
from diagrams.aws.database import DynamodbTable
from diagrams.aws.integration import SNS
from diagrams.aws.network import APIGateway

with Diagram("Calendar Events", show=False, direction="TB"):

    events = Lambda("calendar events")
    topic = SNS("calendar topic")

    APIGateway("calendar events api") >> events >> DynamodbTable(
        "calendar events") >> events
    events >> topic
示例#3
0
from diagrams.aws.compute import Lambda
from diagrams.aws.storage import S3
from diagrams.aws.network import APIGateway
from diagrams.aws.database import DynamodbTable
from diagrams.aws.security import IdentityAndAccessManagementIam
from diagrams.aws.devtools import Codebuild
from diagrams.aws.devtools import Codecommit
from diagrams.aws.devtools import Codedeploy
from diagrams.aws.devtools import Codepipeline
from diagrams.aws.management import Cloudformation
from diagrams.aws.devtools import CommandLineInterface

with Diagram("Serverless Web Apps", show=False, direction="TB"):

    with Cluster("CloudFormation"):
        cloudformation = Cloudformation("Stack")
        cloudformation >> IdentityAndAccessManagementIam("IAM") >> Codecommit(
            "CodeCommit") >> Codebuild("CodeBuild") >> S3(
                "S3") >> Codepipeline("CodePipeline")

    with Cluster("CodePipeline"):
        codepipeline = Codepipeline("Pipeline")
        codepipeline >> Codecommit("CodeCommit") >> Codebuild(
            "CodeBuild") >> Cloudformation("CloudFormation")

    with Cluster("Serverless Application Model"):
        sam = Cloudformation("SAM Template")
        sam >> APIGateway("API Gateway") >> Lambda("Lambda") >> DynamodbTable(
            "DynamoDB")
        cloudformation >> codepipeline >> sam
示例#4
0
        builder = User("Builder")
        cli = CommandLineInterface("AWS CLI")
        builder >> cli

    with Cluster("CloudFormation"):
        cloudformation = Cloudformation("Stack")
        cloudformation >> IdentityAndAccessManagementIam("IAM")
        cloudformation >> Codecommit("CodeCommit")
        cloudformation >> Codebuild("CodeBuild")
        cloudformation >> Codepipeline("CodePipeline")
        cloudformation >> S3("S3")
        cli >> cloudformation

    with Cluster("CodePipeline"):
        codepipeline = Codepipeline("Pipeline")
        codepipeline >> Codecommit("CodeCommit")
        codepipeline >> Codebuild("CodeBuild")
        codepipeline >> Cloudformation("CloudFormation")

    with Cluster("Serverless Application Model"):
        sam = Cloudformation("SAM Template")
        apigateway = APIGateway("API Gateway")
        mylambda = Lambda("Lambda")
        ddb = DynamodbTable("DynamoDB")
        sam >> apigateway
        sam >> mylambda
        sam >> ddb

        cloudformation >> codepipeline >> sam

        console >> apigateway
示例#5
0
from diagrams import Cluster, Diagram, Edge
from diagrams.aws.compute import LambdaFunction
from diagrams.aws.database import DynamodbTable
from diagrams.aws.management import CloudwatchEventTimeBased
from diagrams.aws.integration import SimpleNotificationServiceSnsTopic, SimpleNotificationServiceSnsEmailNotification
from diagrams.custom import Custom

with Diagram("KiwiBuild Notifier", show=False):
    """
    Architectural diagram for the KiwiBuild Notifier system.
    """

    with Cluster("Internet"):
        internet = Custom("KiwiBuild Website", "docs/img/web.png")
    with Cluster("AWS"):
        trigger = CloudwatchEventTimeBased("Scheduled Trigger")
        scrape_fn = LambdaFunction("KiwiBuildScrapeFunction")
        table = DynamodbTable("Property")
        notify_fn = LambdaFunction("KiwiBuildNotifyFunction")
        topic = SimpleNotificationServiceSnsTopic("SNS Topic")
        notification = SimpleNotificationServiceSnsEmailNotification()

    trigger >> scrape_fn

    scrape_fn >> Edge(label="Store") >> table
    scrape_fn >> Edge(label="Read") >> internet

    table >> Edge(label="Stream trigger") >> notify_fn
    notify_fn >> Edge(label="Filter") >> topic
    topic >> notification
示例#6
0
# https://diagrams.mingrammer.com/docs/nodes/aws
from diagrams import Cluster, Diagram
from diagrams.aws.compute import Lambda
from diagrams.aws.general import User
from diagrams.aws.network import APIGateway
from diagrams.aws.database import DynamodbTable
from diagrams.onprem.client import Client
from diagrams.aws.devtools import CommandLineInterface

with Diagram("Serverless Web App Workflow", show=False, direction="LR"):

    user = User("User")
    console = Client("Browser")
    api = APIGateway("API Gateway")
    mylambda = Lambda("Lambda")
    ddb = DynamodbTable("DynamodbTable")

    user >> console >> api >> mylambda >> ddb
示例#7
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from diagrams import Diagram
from diagrams.aws.database import DynamodbTable
from diagrams.aws.integration import Eventbridge
from diagrams.aws.analytics import KinesisDataStreams
from diagrams.aws.compute import Lambda

graph_attr = {
    "fontsize": "10",
    "bgcolor": "white",
}

with Diagram(
        "DynamoDB table (dynamodb-logs) writes",
        show=True,
        filename="writes",
        graph_attr=graph_attr,
):
    table = DynamodbTable("DynamoDB table")
    stream = KinesisDataStreams("DynamoDB Stream")
    trigger = Lambda("Lambda")
    event_bridge = Eventbridge("EventBridge")
    table >> stream >> trigger >> event_bridge
from diagrams import Diagram
from diagrams.aws.database import DynamodbTable

with Diagram("AWS DynamoDB Table", show=False, direction="TB"):

    DynamodbTable("dynamodb table")