• EXECUTION
  • DATA
  • LOGIC
  • HUMAN

How to run proprietary code with your AI

Connect your AWS environment to your AI client. Once linked, your agent can trigger specific functions to execute custom logic on demand.

Ask AI about this page

Short answer

How can I run my own code through my AI?

You use the Amazon Lambda Invoke connector to trigger specific Lambda functions. Your AI sends the payload to AWS, runs your logic, and brings the results back to your chat. This lets you perform custom calculations or data lookups without leaving your agent.

The outcomes.

Where your requests land.

The AI handles the AWS connection so you can focus on the logic.

EXECUTION

Code runs in AWS

The AI sends your request to the specified Lambda function. Your proprietary code executes in your secure AWS environment.

DATA

Results return to chat

The function's output is passed back to your agent. You get the processed results immediately in your conversation.

LOGIC

Custom business rules

Since you control the Lambda code, the AI can perform any task you've programmed, like complex math or database updates.

HUMAN

You review the output

The AI presents the function's return value. You decide if the result is correct or if you need to trigger a different function.

The workflow

What your AI does when you ask it to run code.

The AI acts as the bridge between your chat interface and your AWS infrastructure.

  1. Identify the function

    Your agent looks at your request and determines which Lambda function needs to be called to satisfy the task.

    invoke_function
  2. Prepare the payload

    The AI formats your instructions into the specific JSON structure your function expects.

    invoke_function
  3. Execute the call

    The agent sends the command to AWS to start the execution of your proprietary logic.

    invoke_function
  4. Deliver the response

    The AI captures the return value from the function and translates it into a readable answer for you.

    invoke_function

Try it

Copy these to start.

Use these prompts to trigger your AWS logic.

Starting points

These are just examples. You'll need to swap in your actual function names and the specific data your code needs.

Amazon Lambda Invoke Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_A74yu31QG6UrR8vO5MgKwlxUiKSO5h246g9tEqbV/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Amazon Lambda Invoke capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "amazon-lambda-invoke-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_A74yu31QG6UrR8vO5MgKwlxUiKSO5h246g9tEqbV/mcp"
    }
  }
}
Copy into chat04
  • Run my 'calculate-tax' Lambda function with the following data: {'amount': 150, 'state': 'NY'}

  • Trigger the 'process-image' function for the file I just uploaded.

  • Use the 'get-user-status' Lambda to check the account details for user_id 9982.

  • Execute the 'generate-report' function and tell me when the summary is ready.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Amazon Lambda Invoke once, then ask.

Just provide your AWS credentials through the secure setup. Once connected, your AI can call any function you authorize.

Connect Amazon Lambda Invoke to your AI

FAQ

How this task behaves

  • 01

    Can the AI change my Lambda function code?

    No. The AI can only trigger the execution of existing functions using the provided tools.

  • 02

    Does the AI have access to my entire AWS account?

    No. The AI only has permission to perform the specific actions allowed by the tools you connect.

  • 03

    Can I run functions that require long-running processes?

    The AI triggers the invocation, but the execution is subject to standard AWS Lambda timeout limits.

  • 04

    Will my AWS credentials be shared with the AI model?

    No. Your credentials stay encrypted and are only used by the MCP to make the authorized calls.

  • 05

    Can the AI delete my Lambda functions?

    No. There is no tool provided to delete or modify your AWS resources.

  • More questions about Amazon Lambda Invoke? The Connector page answers them. See everything the Amazon Lambda Invoke Connector can do

Connect Amazon Lambda Invoke to Claude, Cursor, ChatGPT & more