Skip to main content

AWS EC2 lifecycle manager with AI chat agent (describe, start, stop, reboot)

Workflow preview

Workflow preview
100%
AWS EC2 lifecycle manager with AI chat agent (describe, start, stop, reboot) preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

EC2 Lifecycle Manager with AI Chat Agent (Describe, Start, Stop, Reboot, Terminate) Watch the demo video below: [![Watch the video](https://s3.ap southeast 1.amazonaws.com/automatewith.me/managed a...

Best for

  • DevOps automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.httprequesttool, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Trung Tran.

Original n8n.io source

1.1 Workflow description

Title
AWS EC2 lifecycle manager with AI chat agent (describe, start, stop, reboot)
Workflow name
AWS EC2 lifecycle manager with AI chat agent (describe, start, stop, reboot)

EC2 Lifecycle Manager with AI Chat Agent (Describe, Start, Stop, Reboot, Terminate)

Watch the demo video below:

Who’s it for

This workflow is designed for DevOps engineers and cloud administrators who want to manage AWS EC2 instances directly from chat platforms (Slack, Teams, Telegram, etc.) using natural language.
It helps engineers quickly check EC2 instance status, start/stop servers, reboot instances, or terminate unused machines — without logging into the AWS console.

How it works / What it does

  1. A chat message (command) from the engineer triggers the workflow.
  2. The EC2 Manager AI Agent interprets the request using the AI chat model and memory.
  3. The agent decides which AWS EC2 action to perform:
    • DescribeInstances → List or check status of EC2 instances.
    • StartInstances → Boot up stopped instances.
    • StopInstances → Gracefully shut down running instances.
    • RebootInstances → Restart instances without stopping them.
    • TerminateInstances → Permanently delete instances.
  4. The selected tool (API call) is executed via an HTTP Request to the AWS EC2 endpoint.
  5. The agent replies back in chat with the result (confirmation, instance status, errors, etc.).

How to set up

  1. Add Chat Trigger

    • Connect your chatbot platform (Slack/Telegram/Teams) to n8n.
    • Configure the “When chat message received” node.
  2. Configure OpenAI Chat Model

    • Select a supported LLM (GPT-4, GPT-4.1, GPT-5, etc.).
    • Add system and user prompts to define behavior (EC2 assistant role).
  3. Add Memory

    • Use Simple Memory to keep track of context (e.g., instance IDs, region, last action).
  4. Connect EC2 API Tools

    • Create HTTP Request nodes for:
      • Describe Instances
      • Start Instance
      • Stop Instance
      • Reboot Instance
      • Terminate Instance
    • Use AWS credentials with Signature V4 authentication.
    • API endpoint: https://ec2.{region}.amazonaws.com/
  5. Link Tools to Agent

    • Attach all EC2 tools to the EC2 Manager AI Agent node.
    • Ensure the agent can choose which tool to call based on user input.

Requirements

  • n8n instance (self-hosted or cloud).
  • Chat platform integration (Slack, Teams, or Telegram).
  • OpenAI (or other LLM) credentials.
  • AWS IAM user with EC2 permissions:
    • ec2:DescribeInstances
    • ec2:StartInstances
    • ec2:StopInstances
    • ec2:RebootInstances
    • ec2:TerminateInstances
  • AWS region configured for API calls.

How to customize the workflow

  • Add safety checks: Require explicit confirmation before running Stop or Terminate.
  • Region flexibility: Add support for multi-region management by letting the user specify the region in chat.
  • Tag-based filters: Extend DescribeInstances to return only instances matching specific tags (e.g., env=dev).
  • Cost-saving automation: Add scheduled rules to automatically stop instances outside working hours.
  • Enhanced chatbot UX: Format responses into tables or rich messages in Slack/Teams.
  • Audit logging: Store each action (who/what/when) into a database or Google Sheets for compliance.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 2 - Describe Instance

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 3 - Start Instance

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 4 - Stop Instance

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 5 - Reboot Instance

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 6 - Terminate Instance

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 7 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.3

Block 8 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 9 - EC2 Manager AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 10 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow AWS EC2 lifecycle manager with AI chat agent (describe, start, stop, reboot)
Complexity advanced
Nodes 16
Categories DevOps, AI Chatbot
Author Trung Tran
Published 13 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8551/8551.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does AWS EC2 lifecycle manager with AI chat agent (describe, start, stop, reboot) do?

EC2 Lifecycle Manager with AI Chat Agent (Describe, Start, Stop, Reboot, Terminate) Watch the demo video below: [![Watch the video](https://s3.ap southeast 1.amazonaws.com/automatewith.me/managed a...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps, AI Chatbot use case.