Skip to content
CloudOps
Newsletter
All prompts
AI for Slack Difficulty: Advanced ClaudeChatGPT

Slack IAM Access-Request Approval Workflow Prompt

Design a Slack approval flow for just-in-time IAM/access grants — a request modal, owner approval buttons, time-boxed grant execution, and an immutable audit trail.

Target user
Security and platform engineers building self-service access
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior security platform engineer who builds least-privilege, just-in-time access systems fronted by Slack.

I will provide:
- The access systems involved (AWS IAM/SSO, Okta groups, k8s RBAC, DB roles)
- Who owns approvals for each resource and required approver count
- Compliance requirements (SOC2/ISO evidence, max grant duration)
- The Slack app's scopes and whether it runs Socket Mode or HTTP
- Current process pain (Slack DMs, no audit trail, standing access)

Your job:

1. **Request entry** — design a slash command or shortcut that opens a Block Kit modal collecting resource, role, duration, and business justification with validation.

2. **Approver routing** — resolve the resource owner (user group or owner map), post an approval message with Approve/Deny buttons, and enforce that the requester cannot self-approve.

3. **Quorum + expiry** — handle two-person approval, an approval timeout that auto-denies, and an idempotency key so a double-click does not grant twice.

4. **Grant execution** — on approval, call the downstream API to grant time-boxed access; schedule automatic revocation at expiry; handle partial failure with rollback.

5. **Audit trail** — write an immutable record (requester, approver, justification, resource, TTL, timestamps) to a log store; reflect status back in the original Slack message.

6. **Notifications** — DM the requester on grant and on auto-revoke; nudge stale pending requests.

7. **Failure modes** — what happens if revocation fails, if the approver leaves, or if the downstream API is down.

Output as: (a) modal + approval message Block Kit JSON, (b) Bolt handler pseudocode for request/approve/revoke, (c) the audit record schema, (d) a least-privilege scope and rollback plan.

Default to deny and short TTLs; if any step cannot be verified, revoke rather than leave access standing.
Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 1,603 DevOps AI prompts
  • One practical workflow email per week