Deploys or destroys AWS infrastructure on LocalStack using CDK, Terraform, or SAM.
AI agents call localstack-deployer to permanently remove resources in Localstack — typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | The action to perform: 'deploy'/'destroy' for CDK/Terraform, or 'create-stack'/'delete-stack' for CloudFormation. |
s3Bucket | string | — | S3 bucket name used by SAM deployments. If omitted, SAM can use --resolve-s3. |
directory | string | — | The required path to the project directory containing your infrastructure-as-code files. |
resolveS3 | boolean | — | For SAM deployments, whether to use --resolve-s3 when no s3Bucket is provided. |
stackName | string | — | The stack name used by CloudFormation and SAM. Required for 'create-stack'/'delete-stack' actions, and optional for SAM deploy/destroy (defaults can be inferred |
variables | object | — | Key-value pairs for parameterization. Used for Terraform variables (-var) or CDK context (-c). |
saveParams | boolean | — | For SAM deployments, whether to persist resolved parameters to samconfig.toml using --save-params. |
projectType | string | — | The type of project. 'auto' (default) infers from files. Specify 'cdk', 'terraform', 'cloudformation', or 'sam' to override. |
templatePath | string | — | The local template file path used by CloudFormation and SAM. Required for 'create-stack' if not discoverable from 'directory', and optional for SAM as a templat |
Parameters from the server's own tool schema.
The tool explicitly supports destroying AWS infrastructure, which is an irreversible destructive operation. Even the deploy side can overwrite or replace existing infrastructure. The blast radius is critical because it can tear down entire cloud environments (compute, storage, networking, databases) managed by CDK, Terraform, or SAM templates.
From the tool's definition 'Deploys or destroys AWS infrastructure on LocalStack using CDK, Terraform, or SAM'
Risk signalsAccepts file system path (directory)
Attacks that exploit this kind of access
Deploys or destroys AWS infrastructure on LocalStack using CDK, Terraform, or SAM. It is categorised as a Destructive tool in the Localstack MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
localstack-deployer accepts 9 parameters: action, s3Bucket, directory, resolveS3, stackName, variables, saveParams, projectType, templatePath. Required: action. The full parameter table on this page comes from the server's own tool schema.
Register the Localstack MCP server in PolicyLayer and add a rule for localstack-deployer: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Localstack. Nothing to install.
localstack-deployer is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the localstack-deployer rule in your PolicyLayer 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.
Set action: deny in the PolicyLayer policy for localstack-deployer. 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.
localstack-deployer is provided by the Localstack MCP server (@localstack/localstack-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →