awslabs.aws-serverless-mcp-server

v0.2.4
awslabs.aws-serverless-mcp-server Checked 1 hour ago Published 1 day ago

An 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

ParameterTypeDescription
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.

ParameterTypeDescription
application_type *stringType 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

ParameterTypeDescription
iac_toolIaC tool to use
include_examplesWhether 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…

ParameterTypeDescription
event_source *stringEvent source (e.g., api-gw, s3, sqs, sns, kinesis, eventbridge, dynamodb)
runtime *stringProgramming 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

ParameterTypeDescription
use_case *stringDescription of the use case. (e.g. scheduled tasks, event-driven application)
include_examplesWhether 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…

ParameterTypeDescription
template_type *stringTemplate type (e.g., API, ETL, Web)
runtimeLambda 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…

ParameterTypeDescription
project_directory *stringAbsolute path to directory containing the SAM project
base_dirResolve 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_dirThe absolute path to a directory where the built artifacts are stored This directory and all of its content are removed with this option
build_imageThe 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_fileAbsolute 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_varsEnvironment 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…
debugbooleanTurn on debug logging
manifestAbsolute 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_containerbooleanRun build in local machine instead of Docker container.
parallelbooleanBuild your AWS SAM application in parallel.
parameter_overridesCloudFormation parameter overrides encoded as key-value pairs. For example: 'ParameterKey=KeyPairName, ParameterValue=MyKey ParameterKey=InstanceType, ParameterValue=t1.micro
profileAWS profile to use
regionAWS Region to deploy to (e.g., us-east-1)
save_paramsbooleanSave parameters to the SAM configuration file
template_fileAbsolute path to the template file (defaults to template.yaml)
use_containerbooleanUse 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…

ParameterTypeDescription
application_name *stringName of the application to be deployed
project_directory *stringAbsolute path to directory containing the SAM project (defaults to current directory)
capabilitiesIAM capabilities required for the deployment
config_envEnvironment name specifying default parameter values in the configuration file
config_fileAbsolute path to the SAM configuration file
debugbooleanTurn on debug logging
metadataMetadata to include with the stack
parameter_overridesCloudFormation parameter overrides encoded as key-value pairs
profileAWS profile to use
regionAWS region to deploy to
resolve_s3booleanAutomatically create an S3 bucket for deployment artifacts. You cannot set both s3_bucket and resolve_s3 parameters
s3_bucketS3 bucket to deploy artifacts to. You cannot set both s3_bucket and resolve_s3 parameters
s3_prefixS3 prefix for the artifacts
tagsTags to apply to the stack
template_fileAbsolute 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…

ParameterTypeDescription
dependency_manager *stringDependency manager for the Lambda function (e.g. npm, pip)
project_directory *stringAbsolute path to directory where the SAM application will be initialized
project_name *stringName of the SAM project to create
runtime *Runtime environment for the Lambda function. This option applies only when the package type is Zip.
application_insightsActivate Amazon CloudWatch Application Insights monitoring. Helps you monitor the AWS resources in your applications to help identify potential issues. It can analyze A…
application_templatestringTemplate for the SAM application, e.g., hello-world, quick-start, etc. This parameter is required if location is not specified.
architectureArchitecture for the Lambda function.
base_imageBase 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_envEnvironment name specifying default parameter values in the configuration file
config_fileAbsolute path to configuration file containing default parameter values
debugTurn on debug logging
extra_contentOverride custom parameters in the template's cookiecutter.json
locationTemplate 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_insightsDeactivate Amazon CloudWatch Application Insights monitoring
no_tracingDeactivate AWS X-Ray tracing for Lambda functions
package_typePackage type for the Lambda function. Zip creates a .zip file archive, and Image creates a container image.
save_paramsSave parameters to the SAM configuration file
tracingActivate 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…

ParameterTypeDescription
project_directory *stringAbsolute path to directory containing the SAM project
resource_name *stringName of the Lambda function to invoke locally
container_env_varsEnvironment variables to pass to the container
docker_networkDocker network to run the Lambda function in
environment_variables_fileAbsolute path to a JSON file containing environment variables to pass to the function
event_dataJSON string containing event data (alternative to event_file)
event_fileAbsolute path to a JSON file containing event data
layer_cache_basedirDirectory where the layers will be cached
log_fileAbsolute path to a file where the function logs will be written
parameterOverride parameters from the template file
profileAWS profile to use
regionAWS region to use (e.g., us-east-1)
template_fileAbsolute 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…

ParameterTypeDescription
config_envEnvironment name specifying default parameter values in the configuration file
config_fileAbsolute path to configuration file containing default parameter values
cw_log_groupUse 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_timeFetch logs up until this time (format: 5mins ago, tomorrow, or YYYY-MM-DD HH:MM:SS)
profileAWS profile to use
regionAWS region to use (e.g., us-east-1)
resource_nameName 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_paramsbooleanSave parameters to the SAM configuration file
stack_nameName of the CloudFormation stack
start_timeFetch 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 -…

ParameterTypeDescription
limitMaximum number of results to return. If you specify 0, the operation returns up to 10 results.
next_tokenNext token returned by the previous operation.
registry_name_prefixSpecifying 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.
scopeCan 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:…

ParameterTypeDescription
keywords *stringKeywords 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 *stringFor AWS service events, use "aws.events" to search the EventBridge schema registry.
limitMaximum number of results to return. If you specify 0, the operation returns up to 10 results.
next_tokenNext 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…

ParameterTypeDescription
registry_name *stringFor AWS service events, use "aws.events" to access the EventBridge schema registry.
schema_name *stringThe name of the schema to retrieve (e.g., "aws.s3@ObjectCreated" for S3 events).
schema_versionVersion 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

ParameterTypeDescription
project_name *stringProject name
distribution_idCloudFront 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_timeEnd time for metrics (ISO 8601 format). Example: 2025-05-30T21:00:00Z
function_nameLambda 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…
periodPeriod for metrics in seconds
regionAWS region to use (e.g., us-east-1)
resourcesResources to get metrics for
stageAPI Gateway stage
start_timeStart 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

ParameterTypeDescription
domain_name *stringCustom 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 *stringProject name
create_certificateWhether to create a ACM certificate
create_route53_recordWhether 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
regionAWS 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

ParameterTypeDescription
deployment_type *stringType of deployment
project_name *stringProject name. May contain only letters, digits, hyphens, and underscores, up to 128 characters.
project_root *stringAbsolute path to the project root directory
backend_configurationBackend configuration
frontend_configurationFrontend configuration
regionAWS 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.

ParameterTypeDescription
built_assets_path *stringAbsolute path to pre-built frontend assets
project_name *stringProject name
project_root *stringProject root
invalidate_cacheWhether to invalidate the CloudFront cache
regionAWS 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.

ParameterTypeDescription
event_sourceType of event source for which to get guidance
guidance_typeType of guidance: "setup" for initial configuration, "networking" for VPC/connectivity, "troubleshooting" for issues
networking_questionSpecific 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.

ParameterTypeDescription
issue_typeType of troubleshooting: "diagnosis" for identifying issues, or specific issue type for resolution steps
kafka_typeType 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.

ParameterTypeDescription
actionstringOptimization action: "analyze" for tradeoff analysis, "validate" for config validation, "generate_template" for SAM template generation
configsESM configuration to validate (required for validate action)
esm_uuidESM UUID for template generation (required for generate_template action)
event_sourceEvent source type for validation (required for validate action)
optimization_targetsOptimization goals for analysis (required for analyze action)
optimized_configsOptimized configuration for template generation (required for generate_template action)
project_namestringProject name for template generation
regionstringAWS region

secure_esm_msk_policy

Generate security-approved IAM policy for MSK Kafka ESM with scoped permissions. Uses pre-approved templates, not LLM generation.

ParameterTypeDescription
account *stringAWS account ID (12 digits)
cluster_name *stringMSK cluster name
cluster_uuid *stringMSK cluster UUID
function_name *stringLambda function name that will process Kafka events
region *stringAWS region (e.g., us-east-1)
consumer_group_patternstringConsumer group pattern (default: *)
partitionstringAWS partition (aws, aws-cn, aws-us-gov)
topic_patternstringKafka 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.

ParameterTypeDescription
account *stringAWS account ID (12 digits)
function_name *stringLambda function name that will process SQS messages
queue_name *stringSQS queue name
region *stringAWS region (e.g., us-east-1)
partitionstringAWS 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.

ParameterTypeDescription
account *stringAWS account ID (12 digits)
function_name *stringLambda function name that will process Kinesis records
region *stringAWS region (e.g., us-east-1)
stream_name *stringKinesis stream name
partitionstringAWS 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.

ParameterTypeDescription
account *stringAWS account ID (12 digits)
function_name *stringLambda function name that will process DynamoDB stream records
region *stringAWS region (e.g., us-east-1)
table_name *stringDynamoDB table name
partitionstringAWS partition (aws, aws-cn, aws-us-gov)