Medium Risk

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

High parameter count (18 properties)

Part of the AWS Serverless MCP Server MCP server. Enforce policies on this tool with Intercept, the open-source MCP proxy.

AI agents use sam_init to create or modify resources in AWS Serverless MCP Server. Write operations carry medium risk because an autonomous agent could trigger bulk unintended modifications. Rate limits prevent a single agent session from making hundreds of changes in rapid succession. Argument validation ensures the agent passes expected values.

Without a policy, an AI agent could call sam_init repeatedly, creating or modifying resources faster than any human could review. Intercept's rate limiting ensures write operations happen at a controlled pace, and argument validation catches malformed or unexpected inputs before they reach AWS Serverless MCP Server.

Write tools can modify data. A rate limit prevents runaway bulk operations from AI agents.

aws-serverless-mcp-server.yaml
tools:
  sam_init:
    rules:
      - action: allow
        rate_limit:
          max: 30
          window: 60

See the full AWS Serverless MCP Server policy for all 32 tools.

Tool Name sam_init
Category Write
Risk Level Medium

View all 32 tools →

Agents calling write-class tools like sam_init have been implicated in these attack patterns. Read the full case and prevention policy for each:

Browse the full MCP Attack Database →

Other tools in the Write risk category across the catalogue. The same policy patterns (rate-limit, validate) apply to each.

What does the sam_init tool do? +

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 calling this tool, modify the code and infrastructure templates to fit the requirements of your application. Usage tips: - Do not use this tool on existing projects as it creates brand new directory. Instead manually create SAM templates in the existing application's directory. - Either select from one of predefined templates, or from the SAM GitHub repo (https://github.com/aws/aws-sam-cli-app-templates) Returns: Dict[str, Any]: Result of the initialization. It is categorised as a Write tool in the AWS Serverless MCP Server MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.

How do I enforce a policy on sam_init? +

Add a rule in your Intercept YAML policy under the tools section for sam_init. You can allow, deny, rate-limit, or validate arguments. Then run Intercept as a proxy in front of the AWS Serverless MCP Server MCP server.

What risk level is sam_init? +

sam_init is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit sam_init? +

Yes. Add a rate_limit block to the sam_init rule in your Intercept policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block sam_init completely? +

Set action: deny in the Intercept policy for sam_init. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides sam_init? +

sam_init is provided by the AWS Serverless MCP Server MCP server (awslabs.aws-serverless-mcp-server). Intercept sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Let agents act without letting them run wild.

Deterministic policy on every MCP tool call. Per-identity grants. Full audit log.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.