Build an AWS RCS agent in 5 minutes with an AI coding assistant

A smartphone displaying music on a desk with computer monitors showing code

Setting up an RCS agent on AWS End User Messaging is one of those tasks that looks simple until you’re 45 minutes deep in CLI errors. There are 23 registration fields. Three different parameter types. Brand asset dimension requirements. A multi-step approval queue. Get any single field wrong and you start over.

AWS published an open source sample repo that encodes the entire workflow into an AGENTS.md file. Open it in Kiro, Cursor, Windsurf, or any AI coding assistant that reads agent instruction files. Type go. The AI handles the rest.

The whole process takes about five minutes.

️ What the Repo Contains

The repository is aws-samples/sample-rcs-agent-setup-and-send-messages. Three things inside matter most:

  • AGENTS.md: The instruction file AI coding assistants read automatically. It contains the complete RCS setup workflow from credential checks through message testing.
  • brand-assets/: Template SVG files for the agent logo (224×224 px) and banner (1440×448 px), ready to customize and convert to PNG.
  • .kiro/steering/rcs-agent-setup.md: A Kiro-specific steering file with the same instructions, using inclusion: always frontmatter so Kiro loads it without any extra steps.

The AGENTS.md file defines six skills the AI executes in sequence: create the RCS agent, add verified testers, send a test message, set up an inbound keyword, verify inbound messaging, and delete the agent cleanly when you’re done.

⚙️ Prerequisites

Before you clone anything, make sure you have:

  • An AWS account with access to AWS End User Messaging
  • AWS CLI v2.35.12 or later, configured with pinpoint-sms-voice-v2:* permissions
  • An AI coding assistant that reads AGENTS.md files (Kiro, Cursor, or Windsurf all work)
  • librsvg for SVG-to-PNG conversion (brew install librsvg on macOS)
  • A test phone that supports RCS messaging
3D rendered ai text on dark digital background

‍ Step-by-Step Setup

Step 1: Clone the repo

git clone https://github.com/aws-samples/sample-rcs-agent-setup-and-send-messages.git
cd sample-rcs-agent-setup-and-send-messages

Step 2: Open in your AI coding assistant

Open the cloned directory in Kiro, Cursor, Windsurf, or your preferred assistant. It will detect AGENTS.md automatically. Kiro users get the steering file loaded without any manual config.

Step 3: Type “go”

In the chat panel, type go. The AI runs four checks before touching anything:

  • Runs aws sts get-caller-identity to verify credentials. If they’re missing, it asks how you authenticate and supports named profiles, SSO, IAM user credentials, and environment variables.
  • Confirms your account can access AWS End User Messaging.
  • Verifies rsvg-convert is installed for brand asset generation.
  • Asks whether you want quick mode (just provide a brand name) or interactive mode (you specify every detail).

Step 4: Provide a brand name

In quick mode, you give a brand name. The AI generates everything else: a description, an accessible accent color with a 4.5:1 contrast ratio against white, contact information with placeholder values, privacy and terms URLs, and custom SVG brand assets sized to spec.

In interactive mode, the AI walks through each section one at a time: brand name, accent color, logo description, banner description, contact information, and policy URLs.

Step 5: Watch the CLI commands run

The AI executes every step in sequence:

  1. Creates the RCS agent container
  2. Enables deletion protection
  3. Creates a test registration and links it to the agent
  4. Generates SVG brand assets and converts them to PNG
  5. Uploads the logo and banner as registration attachments
  6. Sets all 23 registration fields using the correct parameter type for each (--text-value, --select-choices, or --registration-attachment-id)
  7. Submits the registration and polls for approval
  8. Reports when the agent is active

Step 6: Add a tester and send your first message

Once the agent is approved, the AI asks for your test phone number, registers it as a verified tester, and waits for you to accept the invitation. After verification, it checks for blockers (protect configuration and opt-out lists), then sends the first branded RCS message.

Step 7: Test inbound messaging

The AI configures an automatic keyword response. When you send RCSINBOUNDTESTING to your agent, you receive an automatic reply confirming two-way messaging works. No backend code required to test this.

Why This Approach Works

The AGENTS.md file encodes several non-obvious behaviors that would otherwise cost you an afternoon of trial and error:

The ProblemHow the Repo Handles It
create-rcs-agent takes no --display-name parameterBrand name comes from the registration, not the agent creation call
Three different field parameter types across 23 fieldsA field reference table maps each field to the correct CLI parameter
--field-values does not existInstructions explicitly warn against this non-existent parameter
--attachment-body and --attachment-url conflictInstructions use --attachment-body only
Accent color contrast requirementsPre-validated color choices with 4.5:1 contrast ratio against white are included
Field paths differ from what you’d expectCorrect paths are agentDetails.logoImage and agentDetails.bannerImage
New registration versions don’t inherit field valuesTroubleshooting section warns all 23 fields must be re-populated on new versions

️ Cleanup

When you’re done testing, run these three commands in order. The registration must be deleted before the agent or you’ll hit a ConflictException: RESOURCE_NOT_EMPTY error.

# 1. Disable deletion protection
aws pinpoint-sms-voice-v2 update-rcs-agent 
  --rcs-agent-id <your-agent-id> 
  --no-deletion-protection-enabled 
  --region us-east-1

# 2. Delete the registration first
aws pinpoint-sms-voice-v2 delete-registration 
  --registration-id <your-registration-id> 
  --region us-east-1

# 3. Then delete the agent
aws pinpoint-sms-voice-v2 delete-rcs-agent 
  --rcs-agent-id <your-agent-id> 
  --region us-east-1

The Bigger Pattern

The AGENTS.md approach is reusable beyond this specific workflow. Any complex AWS process with non-obvious API behavior can be encoded the same way: document the correct commands, parameter types, and known pitfalls in a structured file, and let an AI assistant execute it interactively. The repo is a working example of that pattern, not just an RCS setup shortcut.

For a manual walkthrough of the same process, AWS published a companion post on Creating and testing an RCS agent with AWS End User Messaging.

Stay on top of AI & Automation with BizStack Newsletter
BizStack  —  Entrepreneur’s Business Stack
Logo