Skip to content
BeClaude
Industry2026-07-03

AskHN: Using 'claude -p' for running Mr.Jassy - AWS butler agent

Originally published byHacker News

I am trying to setup Mr.Jassy as a Slackbot app. I want Mr. Jassy to be our personal AWS butler. Mr.Jassy has access to AWS resources in read only and can help the team answer questions. The way its setup now is that I run 'claude -p' from inside a lambda and is invoked by slack events....

What Happened

A developer on Hacker News shared their approach to building "Mr. Jassy," a Slackbot that acts as a read-only AWS butler for their team. The core technical detail is that the bot is powered by running claude -p (Claude's command-line prompt flag) from within an AWS Lambda function, triggered by Slack events. This setup allows team members to ask natural language questions about their AWS infrastructure—such as querying EC2 instances, S3 buckets, or IAM roles—and receive answers without needing direct console access or writing CLI commands.

The developer explicitly notes that Mr. Jassy has read-only permissions, which is a critical design choice for safety. The bot essentially acts as a natural language interface to AWS resources, with Claude interpreting user queries and generating appropriate responses based on the data it can access.

Why It Matters

This implementation is notable for several reasons. First, it demonstrates a practical, low-overhead pattern for integrating large language models (LLMs) into operational workflows. By using claude -p inside a Lambda, the developer avoids the complexity of managing a full API integration or maintaining a persistent server—Lambda handles scaling, and Claude handles the NLP heavy lifting.

Second, it highlights a growing trend: using LLMs as "translators" between human intent and cloud infrastructure. Instead of teaching every team member AWS CLI syntax or navigating the AWS Management Console, a Slackbot powered by Claude can democratize access to operational data. This is especially valuable for teams with mixed skill levels or for on-call engineers who need quick answers without context-switching.

Third, the read-only constraint is a smart, responsible use of AI in production. It mitigates the risk of accidental destructive actions (e.g., deleting resources) while still providing significant utility. This pattern—granting the AI agent observation but not action—is a safe starting point for many enterprise deployments.

Implications for AI Practitioners

For developers building similar tools, this case offers several lessons:

Simplicity wins. The claude -p approach inside Lambda is elegant because it offloads both inference and conversation management to Claude. There’s no need to build a custom prompt chain or manage state across invocations—each Slack event triggers a fresh Lambda execution with a clear query. However, this statelessness means the bot cannot maintain context across multiple messages, which may be limiting for complex multi-turn conversations. Cost and latency trade-offs. Running claude -p per invocation means each Slack message incurs a round-trip to Anthropic’s API. For high-traffic teams, this could become costly. Additionally, Lambda cold starts could introduce latency, though this can be mitigated with provisioned concurrency or by using a persistent serverless framework like AWS AppSync. Security boundaries are paramount. The read-only permission is non-negotiable for production use. But practitioners should also consider: what if a user asks a question that inadvertently reveals sensitive data (e.g., "show me all IAM users with full admin access")? The bot should have guardrails to prevent leaking credentials or secrets. Claude’s safety training helps, but explicit prompt engineering and output filtering are advisable. Observability and debugging. When Claude generates an incorrect answer (e.g., misinterpreting a resource name), how does the team debug it? Logging the raw prompt and response is essential. Practitioners should also consider adding a feedback mechanism (e.g., thumbs up/down) to improve the bot over time.

Key Takeaways

  • Running claude -p inside AWS Lambda is a simple, scalable pattern for building a Slackbot that provides natural language access to cloud resources.
  • Read-only permissions are a critical safety measure that balances utility with risk, making this approach suitable for production environments.
  • Practitioners should plan for cost, latency, and security considerations, including prompt engineering to prevent data leakage and logging for debugging.
  • This pattern represents a broader shift toward AI-powered "translators" that lower the barrier to operational tasks, but it works best for single-turn queries rather than complex conversations.
hacker-newsclaudeagents