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:
- Users upload audio to S3 raw audio bucket.
- A Lambda function triggers a transcribe audio job.
- Amazon Transcribe service processes the audio.
- 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:
- Users send a query to the API Gateway GET match API.
- The API Gateway triggers a Lambda GET match function.
- The Lambda function queries Amazon Kendra for search results.
- Kendra searches the translated text in the S3 bucket.
- The Lambda function also queries DynamoDB for metadata.
- 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:
- API Gateway
- Lambda
- Amazon Kendra
- S3 (for storing translated text)
- DynamoDB (for metadata)
These services work together to process user queries and return relevant results.