Mermaid Diagram Syntax and AWS Architecture

Table of Contents

Mermaid Diagram Syntax

What is the basic syntax for creating a flowchart in Mermaid?   drill aws_mermaid aws_diagrams

Back

The basic syntax for creating a flowchart in Mermaid starts with `graph TD` for top-down or `graph LR` for left-right direction, followed by node definitions and connections:

``` graph TD A[Start] –> B[Process] B –> C[End] ```

How do you define different node shapes in a Mermaid diagram?   drill aws_mermaid aws_diagrams

Back

Different node shapes in Mermaid are defined using various brackets:

  • `A[Rectangle]`
  • `B(Rounded Rectangle)`
  • `C((Circle))`
  • `D{Diamond}`
  • `E[/Parallelogram/]`
  • `F[\Parallelogram\]`
  • `G{{Hexagon}}`

AWS Service Connections

How do you represent a connection between two AWS services in a Mermaid diagram?   drill aws_mermaid aws_diagrams

Back

To represent a connection between two AWS services in a Mermaid diagram, use the arrow syntax:

``` graph TD A[S3] –>|Upload| B[Lambda] ```

This shows data flowing from S3 to Lambda, with the label "Upload" on the arrow.

How can you group AWS services together in a Mermaid diagram?   drill aws_mermaid aws_diagrams

Back

To group AWS services together in a Mermaid diagram, use the `subgraph` syntax:

``` subgraph AWS Cloud A[S3] B[Lambda] C[DynamoDB] end ```

This creates a box around the specified services, grouping them visually.

AWS Processing Pipeline

Describe the initial steps of the audio processing pipeline shown in the diagram.   drill aws_mermaid aws_diagrams

Back

The initial steps of the audio processing pipeline are:

  1. Users upload audio to S3 raw audio bucket.
  2. A Lambda function triggers a transcribe audio job.
  3. Amazon Transcribe service processes the audio.
  4. The transcribed audio is stored in an S3 transcribed audio bucket.

How is metadata handled throughout the processing pipeline?   drill aws_mermaid aws_diagrams

Back

Metadata is handled by storing it in DynamoDB at various stages of the pipeline:

  • After the transcription job (step 4)
  • After the translation job (step 7)
  • After the text insights job (step 10)

This allows for tracking and querying of metadata throughout the process.

User Query Flow

Describe the flow when a user queries the system, as shown in the diagram.   drill aws_mermaid aws_diagrams

Back

The user query flow is as follows:

  1. Users send a query to the API Gateway GET match API.
  2. The API Gateway triggers a Lambda GET match function.
  3. The Lambda function queries Amazon Kendra for search results.
  4. Kendra searches the translated text in the S3 bucket.
  5. The Lambda function also queries DynamoDB for metadata.
  6. Results are returned to the user through the API Gateway.

What AWS services are involved in the user query process?   drill aws_mermaid aws_diagrams

Back

The AWS services involved in the user query process are:

  1. API Gateway
  2. Lambda
  3. Amazon Kendra
  4. S3 (for storing translated text)
  5. DynamoDB (for metadata)

These services work together to process user queries and return relevant results.

Author: Jason Walsh

j@wal.sh

Last Updated: 2024-10-30 16:43:54