Skip to content

RFC: Architecture to the cloud formation template MCP server #324

@EashanKaushik

Description

@EashanKaushik

Is this related to an existing feature request or issue?

NO

Summary

Architecting specific AWS Cloud solutions involves creating diagrams that show relationships and interactions between different services. Instead of building the cloud formation template manually, you can use Foundational Model's image analysis capabilities to generate AWS CloudFormation templates by passing an architecture diagram as input.

Use case

The following are relevant use cases for this solution:

[1] Converting whiteboarding sessions to AWS infrastructure – To quickly prototype your designs, you can take the architecture diagrams created during whiteboarding sessions and generate the first draft of a CloudFormation template. You can also iterate over the CloudFormation template to develop a well-architected solution that meets all your requirements.

[2] Fast deployment of architecture diagrams – You can generate boilerplate CloudFormation templates by using architecture diagrams you find on the web. This allows you to experiment quickly with new designs.

[3] Streamlined AWS infrastructure design through collaborative diagramming – You might draw architecture diagrams on a diagramming tool during an all-hands meeting. These raw diagrams can generate boilerplate CloudFormation templates, quickly leading to actionable steps while speeding up collaboration and increasing meeting value.

Proposal

The workflow consists of the following steps:

[1] The user uploads an architecture image (JPEG or PNG), invoking the Amazon Bedrock Inline Agent API.

[2] We use few-shot learning examples to generate the initial cloud formation template. The few-shot learning example consists of templates written with best practices; this helps the model understand writing practices associated with cloud formation template.

[3] The user manually provides instructions using the chat interface to update the initial cloud formation template.

Following tools need to be implemented:

  1. /create_code(architecture: image) -> code: str
  2. /update_code(instruction: str, code:str) -> new_code: str
  3. /deploy_code(code: str) -> succes/fail

create_code will consist of an Amazon Bedrock Inline Agent capable of completing the task.

Out of scope

CDK or terraform code generation

Potential challenges

The AWS CloudFormation template generated by the MCP server serves as a reference or starting point for development purposes. It should not be directly utilized in production environments without proper testing and validation. Developers are responsible for thoroughly evaluating and modifying the CloudFormation template to ensure compliance with established security best practices and guidelines before deploying it to production systems.

Dependencies and Integrations

No response

Alternative solutions

https://github.com/aws-samples/architecture-to-cloudformation?tab=readme-ov-file

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions