awslabs.aws-serverless-mcp-server
v0.2.4An AWS Labs Model Context Protocol (MCP) server for AWS Serverless
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
webapp_deployment_help
Get help information about using the deploy_webapp_tool to perform web application deployments. If deployment_type is provided, returns help information for that deployment type. Otherwise, returns general help information. Returns: Dict: Deployment help information
| Parameter | Type | Description |
|---|---|---|
deployment_type * | Type of deployment to get help information for |
deploy_serverless_app_help
Provides instructions on how to deploy a serverless application to AWS Lambda. Deploying a Lambda application requires generating IaC templates, building the code, packaging the code, selecting a deployment tool, and executing the deployment commands. This tool walks through each step and links to tools in this MCP server. For deploying web applications specifically, use the deploy_webapp_tool. Returns: Dict[str, Any]: A dictionary containing the deployment help information.
| Parameter | Type | Description |
|---|---|---|
application_type * | string | Type of application to deploy |
get_iac_guidance
Returns guidance on selecting an infrastructure as code (IaC) platform to deploy Serverless applications to AWS. Using IaC is a best practice when managing AWS resources. IaC platform choices include AWS SAM, CDK, and CloudFormation. Use this tool to decide which IaC tool to use for your Serverless deployments based on your specific use case and requirements. By default, SAM is the recomended framework. Returns: Dict: IaC guidance information
| Parameter | Type | Description |
|---|---|---|
iac_tool | IaC tool to use | |
include_examples | Whether to include examples |
get_lambda_event_schemas
Returns AWS Lambda event schemas for different event sources (e.g. s3, sns, apigw) and programming languages. When a event source triggers a Lambda function, the request payload comes in a specific format. Each Lambda event source defines its own schema and language-specific types, which should be used in the Lambda function handler to correctly parse the event data. If you cannot find a schema for your event source, you can directly parse the event data as a JSON object. For EventBridge events, you must use the list_registries, search_schema, and describe_sche…
| Parameter | Type | Description |
|---|---|---|
event_source * | string | Event source (e.g., api-gw, s3, sqs, sns, kinesis, eventbridge, dynamodb) |
runtime * | string | Programming language for the schema references (e.g., go, nodejs, python, java) |
get_lambda_guidance
Use this tool to determine if AWS Lambda is suitable platform to deploy an application. Returns a comprehensive guide on when to choose AWS Lambda as a deployment platform. It includes scenarios when to use and not use Lambda, advantages and disadvantages, decision criteria, and specific guidance for various use cases (e.g. scheduled tasks, event-driven application). Returns: Dict: Lambda guidance information
| Parameter | Type | Description |
|---|---|---|
use_case * | string | Description of the use case. (e.g. scheduled tasks, event-driven application) |
include_examples | Whether to include examples |
get_serverless_templates
Returns example SAM templates from the Serverless Land GitHub repo. Use this tool to get examples for building serverless applications with AWS Lambda and best practices of serverless architecture. The examples are centered on event-driven architecture that can help you boost agility and build reliable, scalable applications. Services like Lambda, EventBridge, Step Functions, SQS, SNS, and API Gateway are featured here. Examples can be deployed out of the box using the SAM CLI, or you can modify examples to fit your needs. Usage tips: - Each te…
| Parameter | Type | Description |
|---|---|---|
template_type * | string | Template type (e.g., API, ETL, Web) |
runtime | Lambda runtime (e.g., nodejs22.x, python3.13) |
sam_build
Builds a serverless application using AWS SAM (Serverless Application Model) CLI. Requirements: - AWS SAM CLI MUST be installed and configured in your environment - An application MUST already be initialized with 'sam_init' tool to create sam project structure. This command compiles your Lambda function and layer code, creates deployment artifacts, and prepares your application for deployment and local testing. It creates a .aws-sam directory that structures your application in a format and location that sam local and sam deploy require. For Zip…
| Parameter | Type | Description |
|---|---|---|
project_directory * | string | Absolute path to directory containing the SAM project |
base_dir | Resolve relative paths to function's source code with respect to this folder. Use this option if you want to change how relative paths to source code folders are resolved. By… | |
build_dir | The absolute path to a directory where the built artifacts are stored This directory and all of its content are removed with this option | |
build_image | The URI of the container image that you want to pull for the build. By default, AWS SAM pulls the container image from Amazon ECR Public. Use this option to pull the image from another lo… | |
container_env_var_file | Absolute path to a JSON file containing container environment variables. You can provide a single environment variable that applies to all serverless resources, or different environmen… | |
container_env_vars | Environment variables to pass to the build container. Each instance takes a key-value pair, where the key is the resource and environment variable, and the value is the… | |
debug | boolean | Turn on debug logging |
manifest | Absolute path to a custom dependency manifest file (e.g., package.json) instead of the default. For example: 'ParameterKey=KeyPairName, ParameterValue=MyKey ParameterKey=InstanceType, Par… | |
no_use_container | boolean | Run build in local machine instead of Docker container. |
parallel | boolean | Build your AWS SAM application in parallel. |
parameter_overrides | CloudFormation parameter overrides encoded as key-value pairs. For example: 'ParameterKey=KeyPairName, ParameterValue=MyKey ParameterKey=InstanceType, ParameterValue=t1.micro | |
profile | AWS profile to use | |
region | AWS Region to deploy to (e.g., us-east-1) | |
save_params | boolean | Save parameters to the SAM configuration file |
template_file | Absolute path to the template file (defaults to template.yaml) | |
use_container | boolean | Use a Lambda-like container to build the function. Use this option if your function requires a specific runtime environment or dependencies that are not available on the local machine.… |
sam_deploy
Deploys a serverless application onto AWS Cloud using AWS SAM (Serverless Application Model) CLI and CloudFormation. Requirements: - AWS SAM CLI MUST be installed and configured in your environment - SAM project MUST be initialized using sam_init tool and built with sam_build. This command deploys your SAM application's build artifacts located in the .aws-sam directory to AWS Cloud using AWS CloudFormation. The only required parameter is project_directory. SAM will automatically create a S3 bucket where build artifacts are uploaded and referenc…
| Parameter | Type | Description |
|---|---|---|
application_name * | string | Name of the application to be deployed |
project_directory * | string | Absolute path to directory containing the SAM project (defaults to current directory) |
capabilities | IAM capabilities required for the deployment | |
config_env | Environment name specifying default parameter values in the configuration file | |
config_file | Absolute path to the SAM configuration file | |
debug | boolean | Turn on debug logging |
metadata | Metadata to include with the stack | |
parameter_overrides | CloudFormation parameter overrides encoded as key-value pairs | |
profile | AWS profile to use | |
region | AWS region to deploy to | |
resolve_s3 | boolean | Automatically create an S3 bucket for deployment artifacts. You cannot set both s3_bucket and resolve_s3 parameters |
s3_bucket | S3 bucket to deploy artifacts to. You cannot set both s3_bucket and resolve_s3 parameters | |
s3_prefix | S3 prefix for the artifacts | |
tags | Tags to apply to the stack | |
template_file | Absolute path to the template file (defaults to template.yaml) |
sam_init
Initializes a serverless application using AWS SAM (Serverless Application Model) CLI. Requirements: - AWS SAM CLI MUST be installed and configured in your environment This tool creates a new SAM project that consists of: - An AWS SAM template to define your infrastructure code - A folder structure that organizes your application - Configuration for your AWS Lambda functions Use this tool to initialize a new project when building a serverless application. This tool generates a project based on a pre-defined template. After call…
| Parameter | Type | Description |
|---|---|---|
dependency_manager * | string | Dependency manager for the Lambda function (e.g. npm, pip) |
project_directory * | string | Absolute path to directory where the SAM application will be initialized |
project_name * | string | Name of the SAM project to create |
runtime * | Runtime environment for the Lambda function. This option applies only when the package type is Zip. | |
application_insights | Activate Amazon CloudWatch Application Insights monitoring. Helps you monitor the AWS resources in your applications to help identify potential issues. It can analyze A… | |
application_template | string | Template for the SAM application, e.g., hello-world, quick-start, etc. This parameter is required if location is not specified. |
architecture | Architecture for the Lambda function. | |
base_image | Base image for the application when package type is Image. The AWS base images are preloaded with a language runtime, a runtime interface client to manage the interacti… | |
config_env | Environment name specifying default parameter values in the configuration file | |
config_file | Absolute path to configuration file containing default parameter values | |
debug | Turn on debug logging | |
extra_content | Override custom parameters in the template's cookiecutter.json | |
location | Template or application location (Git, HTTP/HTTPS, zip file path). This GitHub repo https://github.com/aws/aws-sam-cli-app-templates contains a collection of templates.… | |
no_application_insights | Deactivate Amazon CloudWatch Application Insights monitoring | |
no_tracing | Deactivate AWS X-Ray tracing for Lambda functions | |
package_type | Package type for the Lambda function. Zip creates a .zip file archive, and Image creates a container image. | |
save_params | Save parameters to the SAM configuration file | |
tracing | Activate AWS X-Ray tracing for Lambda functions. X-ray collects data about requests that your application serves and provides tools that you can use to view, filter, and gain insights into… |
sam_local_invoke
Locally invokes a Lambda function using AWS SAM CLI. Requirements: - AWS SAM CLI MUST be installed and configured in your environment - Docker must be installed and running in your environment. This command runs your Lambda function locally in a Docker container that simulates the AWS Lambda environment. Use this tool to test your Lambda functions before deploying them to AWS. It allows you to test the logic of your function faster. Testing locally first reduces the likelihood of identifying issues when testing in the cloud or during deployment…
| Parameter | Type | Description |
|---|---|---|
project_directory * | string | Absolute path to directory containing the SAM project |
resource_name * | string | Name of the Lambda function to invoke locally |
container_env_vars | Environment variables to pass to the container | |
docker_network | Docker network to run the Lambda function in | |
environment_variables_file | Absolute path to a JSON file containing environment variables to pass to the function | |
event_data | JSON string containing event data (alternative to event_file) | |
event_file | Absolute path to a JSON file containing event data | |
layer_cache_basedir | Directory where the layers will be cached | |
log_file | Absolute path to a file where the function logs will be written | |
parameter | Override parameters from the template file | |
profile | AWS profile to use | |
region | AWS region to use (e.g., us-east-1) | |
template_file | Absolute path to the SAM template file (defaults to template.yaml) |
sam_logs
Fetches CloudWatch logs that are generated by Lambda function and API GW resources in a SAM application. Requirements: - AWS SAM CLI MUST be installed and configured in your environment - Your SAM application MUST be deployed and receiving traffic After deploying your serverless application, you can use this tool to monitor it to provide insights on its operations and detect anomalies. Use this tool to help troubleshoot invocation failures, and function code errors and find root causes. Lambda function logs contain application logs emitted by y…
| Parameter | Type | Description |
|---|---|---|
config_env | Environment name specifying default parameter values in the configuration file | |
config_file | Absolute path to configuration file containing default parameter values | |
cw_log_group | Use AWS CloudWatch to fetch logs. Includes logs from the CloudWatch Logs log groups that you specify. If you specify this option along with name, AWS SAM includes logs from the specifi… | |
end_time | Fetch logs up until this time (format: 5mins ago, tomorrow, or YYYY-MM-DD HH:MM:SS) | |
profile | AWS profile to use | |
region | AWS region to use (e.g., us-east-1) | |
resource_name | Name of the resource to fetch logs for. This is be the logical ID of the function resource in the AWS CloudFormation/AWS SAM template. Multiple names can be provided by repeating the p… | |
save_params | boolean | Save parameters to the SAM configuration file |
stack_name | Name of the CloudFormation stack | |
start_time | Fetch logs starting from this time (format: 5mins ago, tomorrow, or YYYY-MM-DD HH:MM:SS) |
list_registries
Lists the registries in your account. REQUIREMENTS: - For AWS service events, you MUST use the aws.events registry directly - For custom schemas, you MAY use LOCAL scope to manage your own registries - When searching AWS service events, you SHOULD use the AWS scope USAGE PATTERNS: 1. Finding AWS Service Event Schemas: - Use aws.events registry directly instead of searching - Filter by AWS scope to see only AWS-provided schemas 2. Managing Custom Schemas: - Use LOCAL scope to view your custom registries -…
| Parameter | Type | Description |
|---|---|---|
limit | Maximum number of results to return. If you specify 0, the operation returns up to 10 results. | |
next_token | Next token returned by the previous operation. | |
registry_name_prefix | Specifying this limits the results to only those registry names that start with the specified prefix. For EventBridge events, use aws.events registry directly instead of searching. | |
scope | Can be set to Local or AWS to limit responses to your custom registries, or the ones provided by AWS. LOCAL: The registry is created in your account. AWS: The registry is creat… |
search_schema
Search for schemas in a registry using keywords. REQUIREMENTS: - You MUST use this tool to find schemas for AWS service events - You MUST search in the "aws.events" registry for AWS service events - You MUST use this tool when implementing Lambda functions that consume events from EventBridge - You SHOULD prefix search keywords with "aws." for optimal results (e.g., "aws.s3", "aws.ec2") - You MAY filter results using additional keywords for specific event types USE CASES: 1. Lambda Function Development with EventBridge:…
| Parameter | Type | Description |
|---|---|---|
keywords * | string | Keywords to search for. Prefix service names with "aws." for better results (e.g., "aws.s3" for S3 events, "aws.ec2" for EC2 events). |
registry_name * | string | For AWS service events, use "aws.events" to search the EventBridge schema registry. |
limit | Maximum number of results to return. If you specify 0, the operation returns up to 10 results. | |
next_token | Next token returned by the previous operation. |
describe_schema
Retrieve the schema definition for the specified schema version. REQUIREMENTS: - You MUST use this tool to get complete schema definitions before implementing handlers - You MUST use this tool when implementing Lambda functions that consume events from EventBridge - You MUST use the returned schema structure for type-safe event handling - You SHOULD use the latest schema version unless specifically required otherwise - You MUST validate all required fields defined in the schema USE CASES: 1. Lambda Function Handlers with EventB…
| Parameter | Type | Description |
|---|---|---|
registry_name * | string | For AWS service events, use "aws.events" to access the EventBridge schema registry. |
schema_name * | string | The name of the schema to retrieve (e.g., "aws.s3@ObjectCreated" for S3 events). |
schema_version | Version number of the schema. For AWS service events, use latest version (default) to ensure up-to-date event handling. |
get_metrics
Retrieves CloudWatch metrics from a deployed web application. Use this tool get metrics on error rates, latency, throttles, etc. of Lambda functions, API Gateways, or CloudFront distributions. This tool can help provide insights into anomalies and monitor operations, which can help with troubleshooting. Returns: Dict: Metrics retrieval result
| Parameter | Type | Description |
|---|---|---|
project_name * | string | Project name |
distribution_id | CloudFront distribution ID to get metrics for. Find the id from the CFN stack output. distribution_id required if the resources parameter list contains cloudfront. | |
end_time | End time for metrics (ISO 8601 format). Example: 2025-05-30T21:00:00Z | |
function_name | Lambda function to get metrics for. Set this parameter if resources parameter contains 'lambda' and the function name is not same as the project_name. Typically, SAM appends a… | |
period | Period for metrics in seconds | |
region | AWS region to use (e.g., us-east-1) | |
resources | Resources to get metrics for | |
stage | API Gateway stage | |
start_time | Start time for metrics (ISO 8601 format). Example: 2025-05-30T20:00:00Z |
configure_domain
Configures a custom domain for a deployed web application on AWS Serverless. Before using this tool, you must already own the domain name and have a Route53 hosted zone in your account. This tool does not register domain names. This tool sets up Route 53 DNS records, ACM certificates, and CloudFront custom domain mappings as needed. Use this tool after deploying your web application to associate it with your own domain name. Returns: Dict: Domain configuration result
| Parameter | Type | Description |
|---|---|---|
domain_name * | string | Custom domain name to use for the CloudFront distribution . You must already own the domain name and have a Route 53 hosted zone in your account. This tool does not register domain names. |
project_name * | string | Project name |
create_certificate | Whether to create a ACM certificate | |
create_route53_record | Whether to create a Route 53 record. When set to True, this tool creates a DNS A record that points to the CloudFront distribution associated with this project | |
region | AWS region to use (e.g., us-east-1) |
deploy_webapp
Deploy web applications to AWS Serverless, including Lambda as compute, DynamoDB as databases, API GW, ACM Certificates, and Route 53 DNS records. This tool uses the Lambda Web Adapter framework so that applications can be written in a standard web framework like Express or Next.js can be easily deployed to Lambda. You do not need to use integrate the code with any adapter framework before using this tool. Returns: Dict: Deployment result and link to pending deployment resource
| Parameter | Type | Description |
|---|---|---|
deployment_type * | string | Type of deployment |
project_name * | string | Project name. May contain only letters, digits, hyphens, and underscores, up to 128 characters. |
project_root * | string | Absolute path to the project root directory |
backend_configuration | Backend configuration | |
frontend_configuration | Frontend configuration | |
region | AWS Region to deploy to (e.g., us-east-1) |
update_webapp_frontend
Update the frontend assets of a deployed web application. This tool uploads new frontend assets to S3 and optionally invalidates the CloudFront cache.
| Parameter | Type | Description |
|---|---|---|
built_assets_path * | string | Absolute path to pre-built frontend assets |
project_name * | string | Project name |
project_root * | string | Project root |
invalidate_cache | Whether to invalidate the CloudFront cache | |
region | AWS region to use (e.g., us-east-1) |
esm_guidance
Create and configure AWS infrastructure for streaming data processing. Handles Kafka clusters (MSK), Kinesis streams, DynamoDB streams, SQS queues with Lambda functions. Sets up VPCs, security groups, IAM roles, and Event Source Mappings. Generates complete SAM templates for deployment.
| Parameter | Type | Description |
|---|---|---|
event_source | Type of event source for which to get guidance | |
guidance_type | Type of guidance: "setup" for initial configuration, "networking" for VPC/connectivity, "troubleshooting" for issues | |
networking_question | Specific networking question (used with guidance_type="networking") |
esm_kafka_troubleshoot
Troubleshoot Kafka streaming issues and connectivity problems. Diagnoses MSK cluster connectivity, Lambda function timeouts, authentication failures, and network configuration issues. Provides step-by-step resolution guidance for Kafka and Lambda integration problems.
| Parameter | Type | Description |
|---|---|---|
issue_type | Type of troubleshooting: "diagnosis" for identifying issues, or specific issue type for resolution steps | |
kafka_type | Type of Kafka cluster: "msk" for Amazon MSK, "self-managed" for self-managed Apache Kafka, "auto-detect" to determine automatically |
esm_optimize
Optimize streaming data processing performance and costs. Analyzes Lambda function configurations for Kafka, Kinesis, DynamoDB, and SQS event sources. Provides recommendations for batch sizes, concurrency, throughput, and cost optimization. Validates configurations and generates deployment templates.
| Parameter | Type | Description |
|---|---|---|
action | string | Optimization action: "analyze" for tradeoff analysis, "validate" for config validation, "generate_template" for SAM template generation |
configs | ESM configuration to validate (required for validate action) | |
esm_uuid | ESM UUID for template generation (required for generate_template action) | |
event_source | Event source type for validation (required for validate action) | |
optimization_targets | Optimization goals for analysis (required for analyze action) | |
optimized_configs | Optimized configuration for template generation (required for generate_template action) | |
project_name | string | Project name for template generation |
region | string | AWS region |
secure_esm_msk_policy
Generate security-approved IAM policy for MSK Kafka ESM with scoped permissions. Uses pre-approved templates, not LLM generation.
| Parameter | Type | Description |
|---|---|---|
account * | string | AWS account ID (12 digits) |
cluster_name * | string | MSK cluster name |
cluster_uuid * | string | MSK cluster UUID |
function_name * | string | Lambda function name that will process Kafka events |
region * | string | AWS region (e.g., us-east-1) |
consumer_group_pattern | string | Consumer group pattern (default: *) |
partition | string | AWS partition (aws, aws-cn, aws-us-gov) |
topic_pattern | string | Kafka topic pattern (default: *) |
secure_esm_sqs_policy
Generate security-approved IAM policy for SQS ESM with scoped permissions. Uses pre-approved templates, not LLM generation.
| Parameter | Type | Description |
|---|---|---|
account * | string | AWS account ID (12 digits) |
function_name * | string | Lambda function name that will process SQS messages |
queue_name * | string | SQS queue name |
region * | string | AWS region (e.g., us-east-1) |
partition | string | AWS partition (aws, aws-cn, aws-us-gov) |
secure_esm_kinesis_policy
Generate security-approved IAM policy for Kinesis ESM with scoped permissions. Uses pre-approved templates, not LLM generation.
| Parameter | Type | Description |
|---|---|---|
account * | string | AWS account ID (12 digits) |
function_name * | string | Lambda function name that will process Kinesis records |
region * | string | AWS region (e.g., us-east-1) |
stream_name * | string | Kinesis stream name |
partition | string | AWS partition (aws, aws-cn, aws-us-gov) |
secure_esm_dynamodb_policy
Generate security-approved IAM policy for DynamoDB Streams ESM with scoped permissions. Uses pre-approved templates, not LLM generation.
| Parameter | Type | Description |
|---|---|---|
account * | string | AWS account ID (12 digits) |
function_name * | string | Lambda function name that will process DynamoDB stream records |
region * | string | AWS region (e.g., us-east-1) |
table_name * | string | DynamoDB table name |
partition | string | AWS partition (aws, aws-cn, aws-us-gov) |