AWS Blogs 前天 03:28
Enhance AI-assisted development with Amazon ECS, Amazon EKS and AWS Serverless MCP server
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

AWS推出了针对Amazon ECS、Amazon EKS和AWS Serverless的专用Model Context Protocol (MCP) 服务器。这些开源解决方案通过提供实时、上下文相关的响应,扩展了AI开发助手的能力,超越了其预训练的知识。MCP服务器利用最新的AWS功能和配置,加速应用程序的开发过程。无论是在IDE中编写代码还是调试生产问题,这些MCP服务器都能为AI代码助手提供对Amazon ECS、Amazon EKS和AWS Serverless的深入理解,从而加速从代码到生产的进程。它们与Amazon Q Developer等流行的AI IDE集成,使用户能够通过自然语言命令构建和部署应用程序。

💡MCP服务器通过提供实时上下文信息,增强了AI助手在AWS环境中的应用开发能力,弥补了大型语言模型(LLM)仅依赖公共文档的不足。

🚀Amazon ECS MCP Server能够在几分钟内部署容器化应用程序,配置包括负载均衡器、网络、自动缩放和监控等相关AWS资源,并通过自然语言指令管理集群操作和解决部署问题。

☸️Amazon EKS MCP Server为AI助手提供关于特定EKS环境的最新上下文信息,包括最新的EKS功能、知识库和集群状态信息,从而在应用程序的整个生命周期中提供更准确和定制的指导。

☁️AWS Serverless MCP Server通过提供关于serverless模式、最佳实践和AWS服务的全面知识,增强serverless开发体验,并通过AWS SAM CLI集成简化函数生命周期和服务集成。

<section class="blog-post-content lb-rtxt"><table id="amazon-polly-audio-table"><tbody><tr><td id="amazon-polly-audio-tab"><p></p></td></tr></tbody></table><p>Today, we’re introducing specialized <a href="https://github.com/modelcontextprotocol&quot;&gt;Model Context Protocol (MCP)</a> servers for <a href="https://aws.amazon.com/ecs/&quot;&gt;Amazon Elastic Container Service (Amazon ECS)</a>, <a href="https://aws.amazon.com/eks/&quot;&gt;Amazon Elastic Kubernetes Service (Amazon EKS)</a>, and <a href="https://aws.amazon.com/serverless/&quot;&gt;AWS Serverless</a>, now available in the <a href="https://github.com/awslabs/mcp&quot;&gt;AWS Labs GitHub repository</a>. These open source solutions extend AI development assistants capabilities with real-time, contextual responses that go beyond their pre-trained knowledge. While <a href="https://aws.amazon.com/what-is/large-language-model/&quot;&gt;Large Language Models (LLM)</a> within AI assistants rely on public documentation, MCP servers deliver current context and service-specific guidance to help you prevent common deployment errors and provide more accurate service interactions.</p><p>You can use these open source solutions to develop applications faster, using up-to-date knowledge of <a href="https://aws.amazon.com/&quot;&gt;Amazon Web Services (AWS)</a> capabilities and configurations during the build and deployment process. Whether you’re writing code in your <a href="https://console.aws.amazon.com/&quot;&gt;integrated development environment (IDE)</a>, or debugging production issues, these MCP servers support AI code assistants with deep understanding of Amazon ECS, Amazon EKS, and AWS Serverless capabilities, accelerating the journey from code to production. They work with popular AI-enabled IDEs, including <a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line.html&quot;&gt;Amazon Q Developer on the command line (CLI)</a>, to help you build and deploy applications using natural language commands.</p><ul><li>The <a href="https://awslabs.github.io/mcp/servers/ecs-mcp-server/&quot;&gt;Amazon ECS MCP Server</a> containerizes and deploys applications to Amazon ECS within minutes by configuring all relevant AWS resources, including load balancers, networking, auto-scaling, monitoring, Amazon ECS task definitions, and services. Using natural language instructions, you can manage cluster operations, implement auto-scaling strategies, and use real-time troubleshooting capabilities to identify and resolve deployment issues quickly.</li><li>For Kubernetes environments, the <a href="https://awslabs.github.io/mcp/servers/eks-mcp-server/&quot;&gt;Amazon EKS MCP Server</a> provides AI assistants with up-to-date, contextual information about your specific EKS environment. It offers access to the latest EKS features, knowledge base, and cluster state information. This gives AI code assistants more accurate, tailored guidance throughout the application lifecycle, from initial setup to production deployment.</li><li>The <a href="https://awslabs.github.io/mcp/servers/aws-serverless-mcp-server/&quot;&gt;AWS Serverless MCP Server</a> enhances the serverless development experience by providing AI coding assistants with comprehensive knowledge of serverless patterns, best practices, and AWS services. Using <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/using-sam-cli.html&quot;&gt;AWS Serverless Application Model Command Line Interface (AWS SAM CLI)</a> integration, you can handle events and deploy infrastructure while implementing proven architectural patterns. This integration streamlines function lifecycles, service integrations, and operational requirements throughout your application development process. The server also provides contextual guidance for infrastructure as code decisions, <a href="https://aws.amazon.com/lambda/&quot;&gt;AWS Lambda</a> specific best practices, and event schemas for AWS Lambda event source mappings.</li></ul><p><strong>Let’s see it in action</strong><br />If this is your first time using AWS MCP servers, visit the <a href="https://github.com/awslabs/mcp?tab=readme-ov-file#installation-and-setup&quot;&gt;Installation and Setup guide in the AWS Labs GitHub repository</a> to installation instructions. Once installed, add the following MCP server configuration to your local setup:</p><p>Install <a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html&quot;&gt;Amazon Q for command line</a> and add the configuration to <code>~/.aws/amazonq/mcp.json</code>. If you’re already an Amazon Q CLI user, add only the configuration.</p><pre class="lang-json">{ "mcpServers": { "awslabs.aws-serverless-mcp": { "command": "uvx", "timeout": 60, "args": ["awslabs.aws_serverless_mcp_server@latest"], }, "awslabs.ecs-mcp-server": { "disabled": false, "command": "uv", "timeout": 60, "args": ["awslabs.ecs-mcp-server@latest"], }, "awslabs.eks-mcp-server": { "disabled": false, "timeout": 60, "command": "uv", "args": ["awslabs.eks-mcp-server@latest"], } }}</pre><p>For this demo I’m going to use the Amazon Q CLI to create an application that understands video using <code><a href="https://github.com/aws-samples/amazon-nova-samples/blob/main/multimodal-understanding/getting-started/02_using_converse_api.ipynb&quot;&gt;02_using_converse_api.ipynb&lt;/a&gt;&lt;/code&gt; from <a href="https://github.com/aws-samples/amazon-nova-samples&quot;&gt;Amazon Nova model cookbook repository</a> as sample code. To do this, I send the following prompt:</p><p><code>I want to create a backend application that automatically extracts metadata and understands the content of images and videos uploaded to an S3 bucket and stores that information in a database. I'd like to use a serverless system for processing. Could you generate everything I need, including the code and commands or steps to set up the necessary infrastructure, for it to work from start to finish? - Use 02_using_converse_api.ipynb as example code for the image and video understanding.</code></p><p>Amazon Q CLI identifies the necessary tools, including the MCP server<code>awslabs.aws-serverless-mcp-server</code>. Through a single interaction, the AWS Serverless MCP server determines all requirements and best practices for building a robust architecture.</p><p><img class="aligncenter wp-image-96666 size-large" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/28/new_serveless-1024x459.jpg&quot; alt="" width="1024" height="459" /></p><p>I ask to Amazon Q CLI that build and test the application, but encountered an error. Amazon Q CLI quickly resolved the issue using available tools. I verified success by checking the record created in the <a href="https://aws.amazon.com/dynamodb/&quot;&gt;Amazon DynamoDB</a> table and testing the application with the <a href="https://github.com/aws-samples/amazon-nova-samples/blob/main/multimodal-understanding/getting-started/media/dog2.jpeg?raw=true&quot;&gt;dog2.jpeg file</a>.</p><p><img class="aligncenter size-large wp-image-96577" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/26/analysis_dog-1024x466.jpg&quot; alt="" width="1024" height="466" /></p><p>To enhance video processing capabilities, I decided to migrate my media analysis application to a containerized architecture. I used this prompt:</p><p><code>I'd like you to create a simple application like the media analysis one, but instead of being serverless, it should be containerized. Please help me build it in a new CDK stack.</code></p><p>Amazon Q Developer begins building the application. I took advantage of this time to grab a coffee. When I returned to my desk, coffee in hand, I was pleasantly surprised to find the application ready. To ensure everything was up to current standards, I simply asked:</p><p><code>please review the code and all app using the awslabsecs_mcp_server tools </code></p><p><img class="aligncenter size-large wp-image-96581" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/26/ecs_review-1024x356.jpeg&quot; alt="" width="1024" height="356" /></p><p>Amazon Q Developer CLI gives me a summary with all the improvements and a conclusion.</p><p><img class="aligncenter size-large wp-image-96582" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/26/ecs_conclusion-1024x197.jpeg&quot; alt="" width="1024" height="197" /></p><p>I ask it to make all the necessary changes, once ready I ask Amazon Q developer CLI to deploy it in my account, all using natural language.</p><p>After a few minutes, I review that I have a complete containerized application from the S3 bucket to all the necessary networking.</p><p><img class="aligncenter size-large wp-image-96596" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/26/Screenshot-2025-05-26-at-7.57.14%E2%80%AFPM-1024x759.png&quot; alt="" width="1024" height="759" /></p><p>I ask Amazon Q developer CLI to test the app send it <a href="https://github.com/aws-samples/amazon-nova-samples/blob/main/multimodal-understanding/getting-started/media/the-sea.mp4&quot;&gt;the-sea.mp4 video file</a> and received a timed out error, so Amazon Q CLI decides to use the <code>fetch_task_logs</code> from <code>awslabsecs_mcp_server</code> tool to review the logs, identify the error and then fix it.</p><p><img class="aligncenter size-large wp-image-96598" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/27/error_eks-1024x453.jpeg&quot; alt="" width="1024" height="453" /></p><p>After a new deployment, I try it again, and the application successfully processed the video file</p><p>I can see the records in my Amazon DynamoDB table.</p><p><img class="aligncenter size-large wp-image-96586" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/26/videotest-1024x476.jpeg&quot; alt="" width="1024" height="476" /></p><p>To test the Amazon EKS MCP server, I have code for a web app in the auction-website-main folder and I want to build a web robust app, for that I asked Amazon Q CLI to help me with this prompt:</p><p><code>Create a web application using the existing code in the auction-website-main folder. This application will grow, so I would like to create it in a new EKS cluster</code></p><p>Once the Docker file is created, Amazon Q CLI identifies <code>generate_app_manifests</code> from <code>awslabseks_mcp_server</code> as a reliable tool to create a Kubernetes manifests for the application.</p><p><img class="aligncenter wp-image-96624 size-large" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/27/docker_1-1024x513.jpeg&quot; alt="" width="1024" height="513" /></p><p>Then create a new EKS cluster using the <code>manage_eks_staks</code> tool.</p><p><img class="aligncenter wp-image-96625 size-large" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/27/docker_2-1024x276.jpeg&quot; alt="" width="1024" height="276" /></p><p>Once the app is ready, the Amazon Q CLI deploys it and gives me a summary of what it created.</p><p><img class="aligncenter size-large wp-image-96626" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/27/docker_3-1024x543.jpeg&quot; alt="" width="1024" height="543" /></p><p>I can see the cluster status in the console.</p><p><img class="aligncenter size-large wp-image-96627" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/27/console_eks-1024x173.jpeg&quot; alt="" width="1024" height="173" /></p><p>After a few minutes and resolving a couple of issues using the <code>search_eks_troubleshoot_guide</code> tool the application is ready to use.</p><p><img class="aligncenter size-large wp-image-96628" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/27/eks_done-1024x464.jpeg&quot; alt="" width="1024" height="464" /></p><p>Now I have a Kitties marketplace web app, deployed on Amazon EKS using only natural language commands through Amazon Q CLI.</p><p><img class="aligncenter size-large wp-image-96630" src="https://d2908q01vomqb2.cloudfront.net/da4b9237bacccdf19c0760cab7aec4a8359010b0/2025/05/27/kitty_place-1024x548.jpeg&quot; alt="" width="1024" height="548" /></p><p><strong>Get started today</strong><br />Visit the <a href="https://github.com/awslabs/mcp?tab=readme-ov-file#installation-and-setup&quot;&gt;AWS Labs GitHub repository</a> to start using these AWS MCP servers and enhance your AI-powered developmen there. The repository includes implementation guides, example configurations, and additional specialized servers <a href="https://github.com/awslabs/mcp/tree/main?tab=readme-ov-file#aws-lambda-mcp-server&quot;&gt;to run AWS Lambda function</a>, which transforms your existing AWS Lambda functions into AI-accessible tools without code modifications, and <a href="https://github.com/awslabs/mcp/tree/main?tab=readme-ov-file#amazon-bedrock-knowledge-bases-retrieval-mcp-server&quot;&gt;Amazon Bedrock Knowledge Bases Retrieval MCP server</a>, which provides seamless access to your Amazon Bedrock knowledge bases. Other <a href="https://github.com/awslabs/mcp?tab=readme-ov-file#installation-and-setup&quot;&gt;AWS specialized servers</a> in the repository include documentation, example configurations, and implementation guides to begin building applications with greater speed and reliability.</p><p>To learn more about MCP Servers for AWS Serverless and Containers and how they can transform your AI-assisted application development, visit the <a href="https://aws.amazon.com/blogs/compute/introducing-aws-serverless-mcp-server-ai-powered-development-for-modern-applications/&quot;&gt;Introducing AWS Serverless MCP Server: AI-powered development for modern applications</a>, <a href="https://aws.amazon.com/blogs/containers/automating-ai-assisted-container-deployments-with-amazon-ecs-mcp-server/&quot;&gt;Automating AI-assisted container deployments with the Amazon ECS MCP Server</a>, and <a href="https://aws.amazon.com/blogs/containers/accelerating-application-development-with-the-amazon-eks-model-context-protocol-server/&quot;&gt;Accelerating application development with the Amazon EKS MCP server</a> deep-dive blogs.</p><p>— <a href="https://www.linkedin.com/in/lizfue/&quot;&gt;Eli&lt;/a&gt;&lt;/p&gt;&lt;/section&gt;&lt;aside id="Comments" class="blog-comments"><div data-lb-comp="aws-blog:cosmic-comments" data-env="prod" data-content-id="f75a0b8a-af1b-4c5b-b28e-74363f638998" data-title="Enhance AI-assisted development with Amazon ECS, Amazon EKS and AWS Serverless MCP server" data-url="https://aws.amazon.com/blogs/aws/enhance-ai-assisted-development-with-amazon-ecs-amazon-eks-and-aws-serverless-mcp-server/&quot;&gt;&lt;p data-failed-message="Comments cannot be loaded… Please refresh and try again.">Loading comments…</p></div></aside>

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

AWS MCP AI开发助手 Serverless
相关文章