Pinpoint Campaign Deployer
What this skill does
Provisions Amazon Pinpoint projects, channels, segments, campaigns, journeys,
and message templates with engagement-best-practice defaults — email channel
requires SES verified identities, SMS channel requires origination numbers
with spend limits, push channel requires valid APNs/FCM credentials, segments
use dimension-based targeting (not raw endpoint IDs), campaigns enforce
quiet-time windows and frequency caps, journeys use the activity graph model
(wait, conditional split, multivariate, random split), and templates use
Liquid for personalization. Runs deterministic pre-checks before any
state-changing CLI, emits the exact create-campaign and create-journey
CLIs behind a CONFIRM gate, and verifies via get-campaign and
get-journey. Every plan surfaces the channel-prerequisite ordering rule,
the segment-resolution check, the quiet-time enforcement, and the journey
activity graph validation.
Quick navigation
| Section |
What it covers |
When to read it |
| Quick reference |
Verdict thresholds + pre-check priority order + channel matrix |
Before any operation |
| Mindset |
Why channel prerequisites matter; segment vs endpoint targeting; journey graph model |
Understanding the deployment model |
| Pre-flight |
Campaign gate — SES identity, SMS origination, APNs/FCM, segment resolution |
Before executing any CLI |
| Process |
Per-operation: project, channels, segments, templates, campaigns, journeys, event stream |
When choosing which operation |
| STRICT output contract |
Required CAMPAIGN/VERDICT/PRE_CHECKS/STEPS/POST_VERIFY block |
Formatting the response |
| NEVER (top 5) |
Hard rules that prevent broken or non-compliant patterns |
Review before deploy |
| Expert heuristic |
Choosing journey vs campaign and channel per use case |
Engagement strategy |
Quick reference — verdict thresholds
| Verdict |
Trigger condition |
Action |
PREREQUISITES_MISSING |
Any pre-check failed (SES identity not verified, SMS origination missing, APNs/FCM invalid, segment resolves to 0 endpoints, template parse failure, schedule in the past, quiet-time with no timezone, frequency cap 0, IAM permission missing, project name collision) |
List failures, do NOT execute |
READY_TO_DEPLOY |
All pre-checks passed; awaiting CONFIRM gate |
Emit exact CLI sequence, wait for operator yes |
Priority order for pre-checks (apply in sequence, all must pass):
- Project existence —
get-app returns the target project or no collision.
- Channel prerequisites — target channel is enabled and verified:
- Email: SES identity (domain or email) is
verified in the same region.
- SMS: origination number provisioned, SMS channel enabled with spend limit.
- Push: APNs
.p8 token key + key ID + team ID; FCM API key or service account.
- Voice: origination number provisioned, voice channel enabled.
- Segment resolution — segment resolves to >0 endpoints (verify via
get-segment-estimate). A 0-endpoint segment sends nothing.
- Message template — template parses (Liquid valid), channel matches.
- Schedule — start time is in the future (or
IMMEDIATE). Timezone set.
- Quiet time — if set,
StartTime, EndTime, and TimeZone all present.
- Frequency cap — if set, must be >= 1. Cap of 0 blocks all sends.
- A/B test — if
AdditionalTreatments set, each has distinct template.
Holdout percentage 0-100. Treatment percentages + holdout sum to 100.
- Journey activity graph — no cycles, every non-END activity has valid
NextActivity, at least one END exists.
- IAM permissions — operator holds
pinpoint:CreateCampaign,
CreateJourney, CreateSegment, and channel-specific update permissions.
Mindset
One-line takeaway: a Pinpoint campaign is not "an email blast" — it is a
channel-prerequisite-ordered deployment where the channel MUST be
configured and verified BEFORE the campaign or journey, the segment MUST
resolve to >0 endpoints, and the journey activity graph is a state machine
with no cycles.
Three facts make Pinpoint provisioning different from "send a message":
Channels must be enabled and verified before campaigns. The email
channel requires a verified SES identity. SMS requires a provisioned
origination number. Push requires valid APNs/FCM credentials. A campaign
created before the channel is enabled sends nothing — silently. No error;
the campaign shows COMPLETED with 0 sends.
Segments use dimension-based targeting, not raw endpoint IDs. A segment
defines criteria (demographic, device, behavior, custom attributes) that
dynamically resolve. Dynamic segments update as attributes change. Imported
segments (CSV/S3) are static. A segment that resolves to 0 endpoints reaches
no one — always verify via get-segment-estimate.
Journeys are state machines, not linear sequences. The activity graph
supports conditional splits, multivariate splits, random splits, wait
activities (time or event), and send activities. MUST be a DAG (no cycles).
Every path must reach END. An open activity leaves endpoints stuck.
Quick reference — channel prerequisite matrix
| Channel |
Prerequisite |
Verification |
Notes |
| Email |
SES verified identity |
sesv2 get-email-identity |
Must be SUCCESS in same region |
| SMS |
Origination number |
pinpoint-phone-number describe-phone-numbers |
Monthly spend limit |
| Push (iOS) |
APNs token key |
pinpoint update-apns-channel |
.p8, key ID, team ID |
| Push (Android) |
FCM API key |
pinpoint update-gcm-channel |
Legacy key or service account |
| Voice |
Origination number |
pinpoint-phone-number describe-phone-numbers |
Same pool as SMS |
Pre-flight: campaign deployment gate
Live-account pre-flight checks (skip if offline architecture plan):
- Verify IAM permissions for
pinpoint:CreateApp, CreateCampaign,
CreateJourney, CreateSegment, channel update operations.
- Verify project:
aws pinpoint get-app --application-id <id>
- Email:
aws sesv2 get-email-identity --email-identity <domain>
- SMS:
aws pinpoint-phone-number describe-phone-numbers
- Segment:
aws pinpoint get-segment-estimate --application-id <id> --segment-id <seg>
If the deployment spec is incomplete, output:
CAMPAIGN: <name-or-unknown>
VERDICT: PREREQUISITES_MISSING
REASON: Deployment specification is missing required fields (<list>).
REQUIRED:
- project_id (existing Pinpoint project application-id)
- channel (email | sms | push | voice)
- segment_id (segment that resolves to >0 endpoints)
- message (template or inline message body)
- schedule (immediate or future start time)
Process — Architecture planning (apply in order)
Step 0: Expert knowledge — non-obvious behaviors
Moved to references/advanced-patterns.md.
Non-obvious behaviors: silent channel enablement, dynamic vs imported segments, S3 import role, quiet time, frequency caps, journey graph rules, in-app messaging, ML recommendations, event streams.
Step 1: Project creation
aws pinpoint create-app \
--create-application-request '{"Name":"prod-engagement","QuietTime":{"StartTime":"22:00","EndTime":"08:00","TimeZone":"America/New_York"}}'
Step 2: Channel configuration
Email:
aws pinpoint update-email-channel \
--application-id <id> \
--email-channel-request '{"FromAddress":"noreply@example.com","Identity":"arn:aws:ses:us-east-1:111111111111:identity/example.com"}'
SMS:
aws pinpoint update-sms-channel \
--application-id <id> \
--sms-channel-request '{"ShortCode":"12345","SenderId":"MYBRAND"}'
APNs (iOS):
aws pinpoint update-apns-channel \
--application-id <id> \
--apns-channel-request '{"BundleId":"com.example.app","TeamId":"ABCDE12345","TokenKey":"-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----","TokenKeyId":"ABC1234567"}'
FCM (Android):
aws pinpoint update-gcm-channel \
--application-id <id> \
--gcm-channel-request '{"ApiKey":"AAAA..."}'
Step 3: Segment creation
Demographic:
aws pinpoint create-segment \
--application-id <id> \
--write-segment-request '{"Name":"premium-ios","SegmentGroups":{"Groups":[{"Dimensions":[{"DeviceType":{"DimensionType":"IN","Values":["ios"]}},{"Attributes":{"tier":{"DimensionType":"IN","Values":["premium"]}}}],"SourceType":"ANY"}]}}'
Imported (S3):
aws pinpoint create-import-job \
--application-id <id> \
--import-job-request '{"DefineSegment":true,"SegmentName":"imported","Format":"CSV","RoleArn":"arn:aws:iam::111111111111:role/PinpointImport","S3Url":"s3://bucket/list.csv"}'
Verify resolution: aws pinpoint get-segment-estimate --application-id <id> --segment-id <seg>
Step 4: Message templates
Email:
aws pinpoint create-email-template \
--email-template-request '{"TemplateName":"welcome","Subject":"Welcome {{UserAttributes.FirstName}}","HtmlPart":"<h1>Hi {{UserAttributes.FirstName}}</h1>","TextPart":"Hi, welcome!"}'
SMS:
aws pinpoint create-sms-template \
--sms-template-request '{"TemplateName":"otp","Body":"Your code: {{Attributes.code}}"}'
Liquid personalization: {{UserAttributes.X}}, {{Attributes.X}}, {{Location.X}}.
Step 5: Campaign creation
aws pinpoint create-campaign \
--application-id <id> \
--write-campaign-request '{"Name":"weekly-promo","SegmentId":"seg-abc","MessageConfiguration":{"EmailTemplate":{"Name":"promo-email"}},"Schedule":{"StartTime":"2026-08-15T10:00:00","Frequency":"WEEKLY","QuietTime":{"StartTime":"22:00","EndTime":"08:00","TimeZone":"America/New_York"}},"IsEnabled":true}'
A/B test:
{
"Name": "ab-subject",
"SegmentId": "seg-abc",
"HoldoutPercent": 10,
"AdditionalTreatments": [
{"Id":"b","MessageConfiguration":{"EmailTemplate":{"Name":"subject-b"}},"SizePercent":45},
{"Id":"c","MessageConfiguration":{"EmailTemplate":{"Name":"subject-c"}},"SizePercent":45}
],
"MessageConfiguration": {"EmailTemplate": {"Name": "subject-a"}},
"Schedule": {"StartTime": "IMMEDIATE"}
}
HoldoutPercent = control (receives nothing). Treatments split the rest.
Step 6: Journey creation
aws pinpoint create-journey \
--application-id <id> \
--write-journey-request '{
"Name":"onboarding",
"Activities":{
"entry":{"Type":"ENTRY","NextActivity":"send-welcome"},
"send-welcome":{"Type":"SEND","MessageConfiguration":{"EmailTemplate":{"Name":"welcome"}},"NextActivity":"wait-1d"},
"wait-1d":{"Type":"WAIT","WaitTime":{"WaitTime":"PT24H"},"NextActivity":"check"},
"check":{"Type":"CONDITIONAL_SPLIT","Condition":{"Conditions":[{"EventCondition":{"Dimensions":[{"EventType":"app_open"}]}}]},"TrueActivity":"end","FalseActivity":"nudge"},
"nudge":{"Type":"SEND","MessageConfiguration":{"EmailTemplate":{"Name":"nudge"}},"NextActivity":"end"},
"end":{"Type":"END"}
},
"StartActivity":"entry",
"State":"DRAFT"
}'
Journey activity types:
| Type |
Purpose |
Required |
ENTRY |
Entry point |
NextActivity |
SEND |
Send message |
MessageConfiguration, NextActivity |
WAIT |
Wait (time/event) |
WaitTime or WaitUntil, NextActivity |
CONDITIONAL_SPLIT |
Yes-no branch |
Condition, TrueActivity, FalseActivity |
MULTIVARIATE_SPLIT |
A/B/C branch |
Branches (sum to 100) |
RANDOM_SPLIT |
Random branch |
Branches (sum to 100) |
END |
End |
(none) |
Validate: no cycles (DAG), every non-END has NextActivity, at least one END.
Step 7: Event stream
aws pinpoint put-event-stream \
--application-id <id> \
--write-event-stream '{"DestinationStreamArn":"arn:aws:kinesis:us-east-1:111111111111:stream/pinpoint-events","RoleArn":"arn:aws:iam::111111111111:role/PinpointStream"}'
Role MUST trust pinpoint.amazonaws.com and grant kinesis:PutRecord.
Step 8: In-app messaging
{
"MessageConfiguration": {
"InAppMessage": {
"Content": [{"Header":"Welcome!","Body":"Complete your profile.","Buttons":[{"Text":"Start","Action":{"Type":"LINK","Link":"https://app.example.com/onboarding"}}]}],
"Layout": "BOTTOM_BANNER"
}
}
}
STRICT output contract
Required output structure
Every response MUST begin with this block — no preamble:
CAMPAIGN: <name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
TARGET: <name> (campaign-id: <id> for updates)
PRE_CHECKS:
- [PASS] <check description>
- [FAIL] <check description> — <reason>
STEPS:
1. CONFIRM: About to <operation> campaign <name> in project <id> region <region>. This will <consequence>. Proceed? (yes/no)
2. <exact CLI command — no placeholders>
POST_VERIFY:
- [PASS] <verification description>
- [FAIL] <verification description> — <reason>
CHANNEL: <email | sms | push | voice | multi>
SEGMENT: <segment-id> (<type>, <count> endpoints)
TEMPLATE: <template-name> (<channel>)
SCHEDULE: <immediate | scheduled>
QUIET_TIME: <start-end TZ | none>
FREQUENCY_CAP: <N/day | none>
AB_TEST: <holdout% + treatments | none>
JOURNEY: <graph summary | none>
NOTES: <strategy, cost, deliverability caveats>
FORBIDDEN output patterns
- NEVER start with "Let me analyze…" — the VERDICT block is the FIRST line.
- NEVER use lowercase verdict values — emit
READY_TO_DEPLOY or
PREREQUISITES_MISSING.
- NEVER omit PRE_CHECKS — every pre-check must appear with
[PASS] or
[FAIL] and a specific reason.
- NEVER emit placeholder values in a READY_TO_DEPLOY plan.
- NEVER omit the CONFIRM gate as the first STEPS entry.
- NEVER claim success without verifying campaign is ENABLED via
get-campaign.
- NEVER change CLI step order — channel first, segment second, template
third, campaign last.
- NEVER silently allow frequency cap of 0 — block with [FAIL].
Perfect example output
CAMPAIGN: weekly-newsletter
VERDICT: READY_TO_DEPLOY
TARGET: weekly-newsletter
PRE_CHECKS:
- [PASS] Project app-abc123 exists
- [PASS] Email channel enabled, SES identity example.com verified
- [PASS] Segment seg-all resolves to 128450 endpoints
- [PASS] Template newsletter parses, Liquid valid
- [PASS] Schedule 2026-08-15T10:00:00 WEEKLY (future)
- [PASS] Quiet time 22:00-08:00 America/New_York
- [PASS] Frequency cap 5/day
- [PASS] IAM principal holds pinpoint:CreateCampaign
STEPS:
1. CONFIRM: About to create-campaign weekly-newsletter in project app-abc123 region us-east-1. SEND weekly email to 128450 endpoints starting 2026-08-15. Estimated cost: $12.85 (128450 x $0.0001). Proceed? (yes/no)
2. aws pinpoint get-app --application-id app-abc123
3. aws sesv2 get-email-identity --email-identity example.com
4. aws pinpoint get-segment-estimate --application-id app-abc123 --segment-id seg-all
5. aws pinpoint create-email-template --email-template-request '{"TemplateName":"newsletter","Subject":"Your weekly digest","HtmlPart":"...","TextPart":"..."}'
6. aws pinpoint create-campaign --application-id app-abc123 --write-campaign-request '{"Name":"weekly-newsletter","SegmentId":"seg-all","MessageConfiguration":{"EmailTemplate":{"Name":"newsletter"}},"Schedule":{"StartTime":"2026-08-15T10:00:00","Frequency":"WEEKLY","QuietTime":{"StartTime":"22:00","EndTime":"08:00","TimeZone":"America/New_York"}},"IsEnabled":true}'
POST_VERIFY:
- (pending execution)
- get-campaign returns State=SCHEDULED or COMPLETED
CHANNEL: email
SEGMENT: seg-all (demographic, 128450 endpoints)
TEMPLATE: newsletter (email)
SCHEDULE: 2026-08-15T10:00:00 WEEKLY
QUIET_TIME: 22:00-08:00 America/New_York
FREQUENCY_CAP: 5/day
NOTES:
- SES identity must remain verified.
- Frequency cap 5/day is project-wide — concurrent campaigns may reduce reach.
NEVER (top 5)
NEVER create a campaign before verifying the channel is enabled.
Pinpoint silently accepts the campaign and produces zero sends — no error.
The email channel requires a verified SES identity; SMS requires a
provisioned origination number; push requires valid APNs/FCM credentials.
Always pre-check via get-email-channel, get-sms-channel, etc.
NEVER target a segment without verifying it resolves to >0 endpoints.
Overly-restrictive dimensions or stale attributes can resolve to zero —
the campaign sends nothing. Always verify via get-segment-estimate.
NEVER deploy a journey without validating the activity graph. A cycle
(infinite loop), open activity (no NextActivity on non-END), or no END
activity leaves endpoints stuck or looping. Validate: DAG, all paths reach
END, all referenced activities exist.
NEVER set a frequency cap of 0. A cap of 0 blocks ALL sends across the
project. Pinpoint accepts it. Always set >= 1 or omit entirely.
NEVER use quiet time without a timezone. Without TimeZone, quiet time
is ambiguous — Pinpoint may default to UTC, wrong for most audiences.
Expert heuristic: choosing journey vs campaign and channel per use case
Engagement pattern
├─ One-time broadcast (announcement, newsletter)?
│ └─ Campaign (scheduled or immediate)
│ Channel: email (low cost) or SMS (high open rate)
│
├─ Multi-step lifecycle (onboarding, win-back, drip)?
│ └─ Journey (activity graph)
│ Entry: event or segment-based
│ Activities: SEND -> WAIT -> CONDITIONAL_SPLIT -> SEND -> END
│ Channel: multi (email + push + in-app)
│
├─ A/B test (subject line, send time, creative)?
│ └─ Campaign with AdditionalTreatments
│ Holdout: 10-20%, 2-5 variants
│
└─ Real-time transactional (OTP, receipt)?
└─ Campaign triggered by event
Channel: SMS (urgent) or email (receipt)
No frequency cap
Channel selection rules:
- Email: default for marketing, newsletters, receipts. $0.0001/send.
Rich HTML, trackable. Requires SES warmup for high volume.
- SMS: urgent, high open rate. $0.00645/msg (US). Requires origination
number and 10DLC/toll-free registration. Use for OTP, alerts.
- Push: free, requires app install. Best for re-engagement.
- Voice: highest cost, highest urgency. Critical alerts only.
- In-app: for active users (app open required). Onboarding, prompts.
ALWAYS emit the cost estimate. Email is cheap; SMS at scale is expensive
(128K messages = $826/US send). Recommend email-first, SMS for urgent.
AWS documentation
References (load on demand)
- advanced-patterns — Step 0 expert knowledge (non-obvious behaviors), edge-case catalog, recent AWS features (2024-2026)
- diagnostic-commands — post-deployment verification commands (campaign, segment, channel, journey, event stream)
- channels-and-segments-guide — channel and segment detail
- journeys-guide — journey activity graph detail
Domain
AWS CloudOps / Pinpoint Multi-Channel Customer Engagement Provisioning.
1---2name: pinpoint-campaign-deployer3description: Provisions Amazon Pinpoint campaigns and engagement workflows — project creation, channels (email, SMS, push, voice), segments (demographic, dynamic, imported), campaigns (schedule, quiet time, A/B test holdout), message templates (email, SMS, push with Liquid), journeys (multi-step with wait, yes-no split, multivariate, random split), event streams (Kinesis), ML-powered segment recommendations, and in-app messaging. Runs deterministic pre-checks (SES verified identities, SMS origination numbers, APNs/FCM credentials, segment resolution, template validation, IAM permissions for Kinesis), emits create-campaign and create-journey CLIs behind a CONFIRM gate, verifies via get-campaign. Emits READY_TO_DEPLOY | PREREQUISITES_MISSING. Use when provisioning Pinpoint projects, building multi-step journeys, or setting up cross-channel campaigns.4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline plan classification. Live-account operations use aws pinpoint create-app, update-email-channel, update-sms-channel, update-apns-channel, update-gcm-channel, create-segment, create-campaign, create-journey, create-message-template, put-event-stream (AWS CLI v2, SSO or key-based credentials).6metadata:7 source: https://skillmd.com/skills/jhkchan/pinpoint-campaign-deployer8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '1'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: AppIntegration15 task_type: deploy16 skill_class: capability17 lifecycle_status: active18 verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING19 version: 0.1.020 author: Jacky Chan — AWS Community Builder21 tags: pinpoint, appintegration, deploy, campaign, journey, segment, multi-channel, messaging, personalization22 dependencies: aws-orchestrator23 keywords: Pinpoint, campaign, journey, segment, email channel, SMS channel, push channel, voice channel, message template, A/B test, holdout, quiet time, multivariate, in-app messaging, event stream, Kinesis, ML recommendations, demographic segment, dynamic segment, imported segment24 when_to_use: Provisioning a new Pinpoint project, configuring channels (email, SMS, push, voice), creating segments (demographic, dynamic, imported), building campaigns with schedules and quiet time, setting up A/B tests, creating multi-step journeys (wait, yes-no, multivariate), deploying message templates, wiring Kinesis event streams, or enabling ML-powered segment recommendations and in-app messaging.25 activation_triggers: create Pinpoint project, provision Pinpoint campaign, Pinpoint journey, Pinpoint segment, Pinpoint email channel, Pinpoint SMS channel, Pinpoint push notification, Pinpoint message template, A/B test campaign, Pinpoint in-app messaging, Pinpoint event stream Kinesis, ML segment recommendations, multivariate journey, pinpoint create-campaign26 invocation_schema: 'Input: either (a) a campaign or journey deployment intent (create, update) with target project id, channel, segment, templates, schedule, journey activity graph, and event stream target; OR (b) a project id for live-account update or validation. Output: deterministic CAMPAIGN/ VERDICT/PRE_CHECKS/STEPS/POST_VERIFY block per operation, where VERDICT is one of READY_TO_DEPLOY, PREREQUISITES_MISSING.'27---2829# Pinpoint Campaign Deployer3031## What this skill does3233Provisions Amazon Pinpoint projects, channels, segments, campaigns, journeys,34and message templates with engagement-best-practice defaults — email channel35requires SES verified identities, SMS channel requires origination numbers36with spend limits, push channel requires valid APNs/FCM credentials, segments37use dimension-based targeting (not raw endpoint IDs), campaigns enforce38quiet-time windows and frequency caps, journeys use the activity graph model39(wait, conditional split, multivariate, random split), and templates use40Liquid for personalization. Runs deterministic pre-checks before any41state-changing CLI, emits the exact `create-campaign` and `create-journey`42CLIs behind a CONFIRM gate, and verifies via `get-campaign` and43`get-journey`. Every plan surfaces the channel-prerequisite ordering rule,44the segment-resolution check, the quiet-time enforcement, and the journey45activity graph validation.4647## Quick navigation4849| Section | What it covers | When to read it |50|---|---|---|51| **Quick reference** | Verdict thresholds + pre-check priority order + channel matrix | Before any operation |52| **Mindset** | Why channel prerequisites matter; segment vs endpoint targeting; journey graph model | Understanding the deployment model |53| **Pre-flight** | Campaign gate — SES identity, SMS origination, APNs/FCM, segment resolution | Before executing any CLI |54| **Process** | Per-operation: project, channels, segments, templates, campaigns, journeys, event stream | When choosing which operation |55| **STRICT output contract** | Required CAMPAIGN/VERDICT/PRE_CHECKS/STEPS/POST_VERIFY block | Formatting the response |56| **NEVER (top 5)** | Hard rules that prevent broken or non-compliant patterns | Review before deploy |57| **Expert heuristic** | Choosing journey vs campaign and channel per use case | Engagement strategy |5859## Quick reference — verdict thresholds6061| Verdict | Trigger condition | Action |62|---|---|---|63| `PREREQUISITES_MISSING` | Any pre-check failed (SES identity not verified, SMS origination missing, APNs/FCM invalid, segment resolves to 0 endpoints, template parse failure, schedule in the past, quiet-time with no timezone, frequency cap 0, IAM permission missing, project name collision) | List failures, do NOT execute |64| `READY_TO_DEPLOY` | All pre-checks passed; awaiting CONFIRM gate | Emit exact CLI sequence, wait for operator yes |6566**Priority order for pre-checks (apply in sequence, all must pass):**67681. **Project existence** — `get-app` returns the target project or no collision.692. **Channel prerequisites** — target channel is enabled and verified:70 - Email: SES identity (domain or email) is `verified` in the same region.71 - SMS: origination number provisioned, SMS channel enabled with spend limit.72 - Push: APNs `.p8` token key + key ID + team ID; FCM API key or service account.73 - Voice: origination number provisioned, voice channel enabled.743. **Segment resolution** — segment resolves to >0 endpoints (verify via75 `get-segment-estimate`). A 0-endpoint segment sends nothing.764. **Message template** — template parses (Liquid valid), channel matches.775. **Schedule** — start time is in the future (or `IMMEDIATE`). Timezone set.786. **Quiet time** — if set, `StartTime`, `EndTime`, and `TimeZone` all present.797. **Frequency cap** — if set, must be >= 1. Cap of 0 blocks all sends.808. **A/B test** — if `AdditionalTreatments` set, each has distinct template.81 Holdout percentage 0-100. Treatment percentages + holdout sum to 100.829. **Journey activity graph** — no cycles, every non-END activity has valid83 `NextActivity`, at least one `END` exists.8410. **IAM permissions** — operator holds `pinpoint:CreateCampaign`,85 `CreateJourney`, `CreateSegment`, and channel-specific update permissions.8687## Mindset8889**One-line takeaway:** a Pinpoint campaign is not "an email blast" — it is a90**channel-prerequisite-ordered deployment** where the channel MUST be91configured and verified BEFORE the campaign or journey, the segment MUST92resolve to >0 endpoints, and the journey activity graph is a state machine93with no cycles.9495Three facts make Pinpoint provisioning different from "send a message":9697- **Channels must be enabled and verified before campaigns.** The email98 channel requires a verified SES identity. SMS requires a provisioned99 origination number. Push requires valid APNs/FCM credentials. A campaign100 created before the channel is enabled sends nothing — silently. No error;101 the campaign shows `COMPLETED` with 0 sends.102103- **Segments use dimension-based targeting, not raw endpoint IDs.** A segment104 defines criteria (demographic, device, behavior, custom attributes) that105 dynamically resolve. Dynamic segments update as attributes change. Imported106 segments (CSV/S3) are static. A segment that resolves to 0 endpoints reaches107 no one — always verify via `get-segment-estimate`.108109- **Journeys are state machines, not linear sequences.** The activity graph110 supports conditional splits, multivariate splits, random splits, wait111 activities (time or event), and send activities. MUST be a DAG (no cycles).112 Every path must reach END. An open activity leaves endpoints stuck.113114## Quick reference — channel prerequisite matrix115116| Channel | Prerequisite | Verification | Notes |117|---|---|---|---|118| Email | SES verified identity | `sesv2 get-email-identity` | Must be `SUCCESS` in same region |119| SMS | Origination number | `pinpoint-phone-number describe-phone-numbers` | Monthly spend limit |120| Push (iOS) | APNs token key | `pinpoint update-apns-channel` | `.p8`, key ID, team ID |121| Push (Android) | FCM API key | `pinpoint update-gcm-channel` | Legacy key or service account |122| Voice | Origination number | `pinpoint-phone-number describe-phone-numbers` | Same pool as SMS |123124## Pre-flight: campaign deployment gate125126**Live-account pre-flight checks (skip if offline architecture plan):**1271. Verify IAM permissions for `pinpoint:CreateApp`, `CreateCampaign`,128 `CreateJourney`, `CreateSegment`, channel update operations.1292. Verify project: `aws pinpoint get-app --application-id <id>`1303. Email: `aws sesv2 get-email-identity --email-identity <domain>`1314. SMS: `aws pinpoint-phone-number describe-phone-numbers`1325. Segment: `aws pinpoint get-segment-estimate --application-id <id> --segment-id <seg>`133134**If the deployment spec is incomplete**, output:135136```text137CAMPAIGN: <name-or-unknown>138VERDICT: PREREQUISITES_MISSING139REASON: Deployment specification is missing required fields (<list>).140REQUIRED:141 - project_id (existing Pinpoint project application-id)142 - channel (email | sms | push | voice)143 - segment_id (segment that resolves to >0 endpoints)144 - message (template or inline message body)145 - schedule (immediate or future start time)146```147148## Process — Architecture planning (apply in order)149150### Step 0: Expert knowledge — non-obvious behaviors151152> Moved to [references/advanced-patterns.md](references/advanced-patterns.md#step-0-expert-knowledge--non-obvious-behaviors).153> Non-obvious behaviors: silent channel enablement, dynamic vs imported segments, S3 import role, quiet time, frequency caps, journey graph rules, in-app messaging, ML recommendations, event streams.154155### Step 1: Project creation156157```bash158aws pinpoint create-app \159 --create-application-request '{"Name":"prod-engagement","QuietTime":{"StartTime":"22:00","EndTime":"08:00","TimeZone":"America/New_York"}}'160```161162### Step 2: Channel configuration163164**Email:**165```bash166aws pinpoint update-email-channel \167 --application-id <id> \168 --email-channel-request '{"FromAddress":"noreply@example.com","Identity":"arn:aws:ses:us-east-1:111111111111:identity/example.com"}'169```170171**SMS:**172```bash173aws pinpoint update-sms-channel \174 --application-id <id> \175 --sms-channel-request '{"ShortCode":"12345","SenderId":"MYBRAND"}'176```177178**APNs (iOS):**179```bash180aws pinpoint update-apns-channel \181 --application-id <id> \182 --apns-channel-request '{"BundleId":"com.example.app","TeamId":"ABCDE12345","TokenKey":"-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----","TokenKeyId":"ABC1234567"}'183```184185**FCM (Android):**186```bash187aws pinpoint update-gcm-channel \188 --application-id <id> \189 --gcm-channel-request '{"ApiKey":"AAAA..."}'190```191192### Step 3: Segment creation193194**Demographic:**195```bash196aws pinpoint create-segment \197 --application-id <id> \198 --write-segment-request '{"Name":"premium-ios","SegmentGroups":{"Groups":[{"Dimensions":[{"DeviceType":{"DimensionType":"IN","Values":["ios"]}},{"Attributes":{"tier":{"DimensionType":"IN","Values":["premium"]}}}],"SourceType":"ANY"}]}}'199```200201**Imported (S3):**202```bash203aws pinpoint create-import-job \204 --application-id <id> \205 --import-job-request '{"DefineSegment":true,"SegmentName":"imported","Format":"CSV","RoleArn":"arn:aws:iam::111111111111:role/PinpointImport","S3Url":"s3://bucket/list.csv"}'206```207208**Verify resolution:** `aws pinpoint get-segment-estimate --application-id <id> --segment-id <seg>`209210### Step 4: Message templates211212**Email:**213```bash214aws pinpoint create-email-template \215 --email-template-request '{"TemplateName":"welcome","Subject":"Welcome {{UserAttributes.FirstName}}","HtmlPart":"<h1>Hi {{UserAttributes.FirstName}}</h1>","TextPart":"Hi, welcome!"}'216```217218**SMS:**219```bash220aws pinpoint create-sms-template \221 --sms-template-request '{"TemplateName":"otp","Body":"Your code: {{Attributes.code}}"}'222```223224Liquid personalization: `{{UserAttributes.X}}`, `{{Attributes.X}}`, `{{Location.X}}`.225226### Step 5: Campaign creation227228```bash229aws pinpoint create-campaign \230 --application-id <id> \231 --write-campaign-request '{"Name":"weekly-promo","SegmentId":"seg-abc","MessageConfiguration":{"EmailTemplate":{"Name":"promo-email"}},"Schedule":{"StartTime":"2026-08-15T10:00:00","Frequency":"WEEKLY","QuietTime":{"StartTime":"22:00","EndTime":"08:00","TimeZone":"America/New_York"}},"IsEnabled":true}'232```233234**A/B test:**235```json236{237 "Name": "ab-subject",238 "SegmentId": "seg-abc",239 "HoldoutPercent": 10,240 "AdditionalTreatments": [241 {"Id":"b","MessageConfiguration":{"EmailTemplate":{"Name":"subject-b"}},"SizePercent":45},242 {"Id":"c","MessageConfiguration":{"EmailTemplate":{"Name":"subject-c"}},"SizePercent":45}243 ],244 "MessageConfiguration": {"EmailTemplate": {"Name": "subject-a"}},245 "Schedule": {"StartTime": "IMMEDIATE"}246}247```248249`HoldoutPercent` = control (receives nothing). Treatments split the rest.250251### Step 6: Journey creation252253```bash254aws pinpoint create-journey \255 --application-id <id> \256 --write-journey-request '{257 "Name":"onboarding",258 "Activities":{259 "entry":{"Type":"ENTRY","NextActivity":"send-welcome"},260 "send-welcome":{"Type":"SEND","MessageConfiguration":{"EmailTemplate":{"Name":"welcome"}},"NextActivity":"wait-1d"},261 "wait-1d":{"Type":"WAIT","WaitTime":{"WaitTime":"PT24H"},"NextActivity":"check"},262 "check":{"Type":"CONDITIONAL_SPLIT","Condition":{"Conditions":[{"EventCondition":{"Dimensions":[{"EventType":"app_open"}]}}]},"TrueActivity":"end","FalseActivity":"nudge"},263 "nudge":{"Type":"SEND","MessageConfiguration":{"EmailTemplate":{"Name":"nudge"}},"NextActivity":"end"},264 "end":{"Type":"END"}265 },266 "StartActivity":"entry",267 "State":"DRAFT"268 }'269```270271**Journey activity types:**272| Type | Purpose | Required |273|---|---|---|274| `ENTRY` | Entry point | `NextActivity` |275| `SEND` | Send message | `MessageConfiguration`, `NextActivity` |276| `WAIT` | Wait (time/event) | `WaitTime` or `WaitUntil`, `NextActivity` |277| `CONDITIONAL_SPLIT` | Yes-no branch | `Condition`, `TrueActivity`, `FalseActivity` |278| `MULTIVARIATE_SPLIT` | A/B/C branch | `Branches` (sum to 100) |279| `RANDOM_SPLIT` | Random branch | `Branches` (sum to 100) |280| `END` | End | (none) |281282**Validate:** no cycles (DAG), every non-END has `NextActivity`, at least one END.283284### Step 7: Event stream285286```bash287aws pinpoint put-event-stream \288 --application-id <id> \289 --write-event-stream '{"DestinationStreamArn":"arn:aws:kinesis:us-east-1:111111111111:stream/pinpoint-events","RoleArn":"arn:aws:iam::111111111111:role/PinpointStream"}'290```291292Role MUST trust `pinpoint.amazonaws.com` and grant `kinesis:PutRecord`.293294### Step 8: In-app messaging295296```json297{298 "MessageConfiguration": {299 "InAppMessage": {300 "Content": [{"Header":"Welcome!","Body":"Complete your profile.","Buttons":[{"Text":"Start","Action":{"Type":"LINK","Link":"https://app.example.com/onboarding"}}]}],301 "Layout": "BOTTOM_BANNER"302 }303 }304}305```306307## STRICT output contract308309### Required output structure310311Every response MUST begin with this block — no preamble:312313```text314CAMPAIGN: <name>315VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING316TARGET: <name> (campaign-id: <id> for updates)317PRE_CHECKS:318 - [PASS] <check description>319 - [FAIL] <check description> — <reason>320STEPS:321 1. CONFIRM: About to <operation> campaign <name> in project <id> region <region>. This will <consequence>. Proceed? (yes/no)322 2. <exact CLI command — no placeholders>323POST_VERIFY:324 - [PASS] <verification description>325 - [FAIL] <verification description> — <reason>326CHANNEL: <email | sms | push | voice | multi>327SEGMENT: <segment-id> (<type>, <count> endpoints)328TEMPLATE: <template-name> (<channel>)329SCHEDULE: <immediate | scheduled>330QUIET_TIME: <start-end TZ | none>331FREQUENCY_CAP: <N/day | none>332AB_TEST: <holdout% + treatments | none>333JOURNEY: <graph summary | none>334NOTES: <strategy, cost, deliverability caveats>335```336337### FORBIDDEN output patterns338339- NEVER start with "Let me analyze…" — the VERDICT block is the FIRST line.340- NEVER use lowercase verdict values — emit `READY_TO_DEPLOY` or341 `PREREQUISITES_MISSING`.342- NEVER omit PRE_CHECKS — every pre-check must appear with `[PASS]` or343 `[FAIL]` and a specific reason.344- NEVER emit placeholder values in a READY_TO_DEPLOY plan.345- NEVER omit the CONFIRM gate as the first STEPS entry.346- NEVER claim success without verifying campaign is ENABLED via347 `get-campaign`.348- NEVER change CLI step order — channel first, segment second, template349 third, campaign last.350- NEVER silently allow frequency cap of 0 — block with [FAIL].351352### Perfect example output353354```text355CAMPAIGN: weekly-newsletter356VERDICT: READY_TO_DEPLOY357TARGET: weekly-newsletter358PRE_CHECKS:359 - [PASS] Project app-abc123 exists360 - [PASS] Email channel enabled, SES identity example.com verified361 - [PASS] Segment seg-all resolves to 128450 endpoints362 - [PASS] Template newsletter parses, Liquid valid363 - [PASS] Schedule 2026-08-15T10:00:00 WEEKLY (future)364 - [PASS] Quiet time 22:00-08:00 America/New_York365 - [PASS] Frequency cap 5/day366 - [PASS] IAM principal holds pinpoint:CreateCampaign367STEPS:368 1. CONFIRM: About to create-campaign weekly-newsletter in project app-abc123 region us-east-1. SEND weekly email to 128450 endpoints starting 2026-08-15. Estimated cost: $12.85 (128450 x $0.0001). Proceed? (yes/no)369 2. aws pinpoint get-app --application-id app-abc123370 3. aws sesv2 get-email-identity --email-identity example.com371 4. aws pinpoint get-segment-estimate --application-id app-abc123 --segment-id seg-all372 5. aws pinpoint create-email-template --email-template-request '{"TemplateName":"newsletter","Subject":"Your weekly digest","HtmlPart":"...","TextPart":"..."}'373 6. aws pinpoint create-campaign --application-id app-abc123 --write-campaign-request '{"Name":"weekly-newsletter","SegmentId":"seg-all","MessageConfiguration":{"EmailTemplate":{"Name":"newsletter"}},"Schedule":{"StartTime":"2026-08-15T10:00:00","Frequency":"WEEKLY","QuietTime":{"StartTime":"22:00","EndTime":"08:00","TimeZone":"America/New_York"}},"IsEnabled":true}'374POST_VERIFY:375 - (pending execution)376 - get-campaign returns State=SCHEDULED or COMPLETED377CHANNEL: email378SEGMENT: seg-all (demographic, 128450 endpoints)379TEMPLATE: newsletter (email)380SCHEDULE: 2026-08-15T10:00:00 WEEKLY381QUIET_TIME: 22:00-08:00 America/New_York382FREQUENCY_CAP: 5/day383NOTES:384 - SES identity must remain verified.385 - Frequency cap 5/day is project-wide — concurrent campaigns may reduce reach.386```387388## NEVER (top 5)3893901. **NEVER create a campaign before verifying the channel is enabled.**391 Pinpoint silently accepts the campaign and produces zero sends — no error.392 The email channel requires a verified SES identity; SMS requires a393 provisioned origination number; push requires valid APNs/FCM credentials.394 Always pre-check via `get-email-channel`, `get-sms-channel`, etc.3953962. **NEVER target a segment without verifying it resolves to >0 endpoints.**397 Overly-restrictive dimensions or stale attributes can resolve to zero —398 the campaign sends nothing. Always verify via `get-segment-estimate`.3994003. **NEVER deploy a journey without validating the activity graph.** A cycle401 (infinite loop), open activity (no `NextActivity` on non-END), or no END402 activity leaves endpoints stuck or looping. Validate: DAG, all paths reach403 END, all referenced activities exist.4044054. **NEVER set a frequency cap of 0.** A cap of 0 blocks ALL sends across the406 project. Pinpoint accepts it. Always set >= 1 or omit entirely.4074085. **NEVER use quiet time without a timezone.** Without `TimeZone`, quiet time409 is ambiguous — Pinpoint may default to UTC, wrong for most audiences.410411## Expert heuristic: choosing journey vs campaign and channel per use case412413```414Engagement pattern415 ├─ One-time broadcast (announcement, newsletter)?416 │ └─ Campaign (scheduled or immediate)417 │ Channel: email (low cost) or SMS (high open rate)418 │419 ├─ Multi-step lifecycle (onboarding, win-back, drip)?420 │ └─ Journey (activity graph)421 │ Entry: event or segment-based422 │ Activities: SEND -> WAIT -> CONDITIONAL_SPLIT -> SEND -> END423 │ Channel: multi (email + push + in-app)424 │425 ├─ A/B test (subject line, send time, creative)?426 │ └─ Campaign with AdditionalTreatments427 │ Holdout: 10-20%, 2-5 variants428 │429 └─ Real-time transactional (OTP, receipt)?430 └─ Campaign triggered by event431 Channel: SMS (urgent) or email (receipt)432 No frequency cap433```434435**Channel selection rules:**436- **Email:** default for marketing, newsletters, receipts. $0.0001/send.437 Rich HTML, trackable. Requires SES warmup for high volume.438- **SMS:** urgent, high open rate. $0.00645/msg (US). Requires origination439 number and 10DLC/toll-free registration. Use for OTP, alerts.440- **Push:** free, requires app install. Best for re-engagement.441- **Voice:** highest cost, highest urgency. Critical alerts only.442- **In-app:** for active users (app open required). Onboarding, prompts.443444ALWAYS emit the cost estimate. Email is cheap; SMS at scale is expensive445(128K messages = $826/US send). Recommend email-first, SMS for urgent.446447## AWS documentation448449- **Pinpoint Developer Guide** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html450- **Campaigns** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/campaigns.html451- **Journeys** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/journeys.html452- **Segments** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/segments.html453- **Message templates** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/message-templates.html454- **Email channel** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/channels-email.html455- **SMS channel** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/channels-sms.html456- **Push notifications** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/channels-mobile-push.html457- **In-app messaging** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/channels-in-app.html458- **Event streams** — https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams.html459- **API Reference** — https://docs.aws.amazon.com/pinpoint/latest/apireference/welcome.html460- **CLI Reference** — https://docs.aws.amazon.com/cli/latest/reference/pinpoint/461462## References (load on demand)463464- [advanced-patterns](references/advanced-patterns.md) — Step 0 expert knowledge (non-obvious behaviors), edge-case catalog, recent AWS features (2024-2026)465- [diagnostic-commands](references/diagnostic-commands.md) — post-deployment verification commands (campaign, segment, channel, journey, event stream)466- [channels-and-segments-guide](references/channels-and-segments-guide.md) — channel and segment detail467- [journeys-guide](references/journeys-guide.md) — journey activity graph detail468469## Domain470471AWS CloudOps / Pinpoint Multi-Channel Customer Engagement Provisioning.