Deploying the stack: resources, permissions and costs
What the CloudFormation template creates in your account, what it is allowed to do, and what it costs to run. Written for the person who approves the deployment.
How it is deployed
Three ways, all the same template:
- AWS Marketplace launch link. After subscribing, Set up your account opens our registration page, whose button opens the CloudFormation console with the template URL and your subscription values pre-filled (the
Marketplace… parameters and SiteArchiveUrl). This is Marketplace's quick-launch path; nothing is installed from anywhere but the release bucket.
- Command line. The template is larger than the 51,200 bytes the CLI accepts inline, so pass it by URL:
aws cloudformation create-stack --stack-name surveycx --template-url https://surveycx-releases-533267257907.s3.us-east-1.amazonaws.com/surveycx/<version>/template.yaml --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND --tags Key=Product,Value=SurveyCX Key=aws-apn-id-533267257907,Value=pc:49an46e6mfy7gfu1iblvfoqb7 --parameters ParameterKey=SiteArchiveUrl,ParameterValue=…/site.zip … and update-stack with the same arguments for upgrades (aws cloudformation deploy also works when you add --s3-bucket <a bucket you own>). Partners use node lambda/provision.js <stack> --version <x.y.z>, which does this per client.
- Your own pipeline. The template is plain CloudFormation with the Serverless transform; it deploys from any pipeline that can run
aws cloudformation deploy.
- Your own domain. Pass
CustomDomain and CertificateArn (an ACM certificate in us-east-1) and point a DNS CNAME at the DistributionDomainName output; see White label.
- Terraform. A module in the repository's
terraform/ directory deploys the same release as one aws_cloudformation_stack resource with every parameter as a variable. See Deploying with Terraform.
A tag on every resource. From 0.20.2 the template tags every billable resource it creates (functions, the table, the stream, the buckets, the distribution, the API, the user pool, the topic, the log groups) with aws-apn-id-533267257907 = pc:49an46e6mfy7gfu1iblvfoqb7. That is the AWS Revenue Measurement tag: it lets AWS attribute the consumption of those resources to SurveyCX, the partner product, for AWS Partner Network reporting. It costs nothing, sends nothing from your account, and you may remove it; stack-level tags you add at deploy time are kept beside it.
Releases live at https://surveycx-releases-533267257907.s3.us-east-1.amazonaws.com/surveycx/<version>/ as template.yaml, the function code zip, site.zip and SHA256SUMS. Keys are immutable: a version never changes after publication. Verify the checksum before deploying if your policy requires it.
Permissions needed to deploy
The person or role running the deployment needs to create the resources below, which means CAPABILITY_IAM (the template creates roles for its functions) and CAPABILITY_AUTO_EXPAND (the Serverless transform). A least-privilege deployment role needs: cloudformation:* on the stack, and create/update/delete on Lambda, IAM roles and policies (scoped to the stack name prefix surveycx-*), DynamoDB, Kinesis, API Gateway v2, S3, CloudFront, Cognito, SNS, EventBridge rules, CloudWatch alarms, dashboards and log groups, and lambda:AddPermission. The AWS managed policy PowerUserAccess plus iam:CreateRole, iam:PutRolePolicy, iam:AttachRolePolicy, iam:PassRole, iam:DeleteRole*, iam:DetachRolePolicy and iam:CreatePolicy/DeletePolicy on surveycx-* is a working superset.
What the stack creates
| Resource |
Count |
Purpose |
| Lambda functions (Node.js 22, arm64) |
10 (11 with Diagnostics=enabled) |
survey flow, contact-record ingest, sender, STOP handling, API, Marketplace metering, themes (only with analysis enabled), digest, Contact Lens evaluations (only with a Connect instance), site installer |
| IAM roles |
10 (one per function) + 2 managed policies, plus a Lex service role with SpokenComments |
each role sees only the stack's own table, stream, bucket and topic; see below |
| DynamoDB table |
1 |
all data; on-demand, encrypted, TTL, point-in-time recovery, two global secondary indexes |
| Kinesis stream |
1 (ShardCount shards, default 1) |
contact records from Connect, KMS-encrypted, 24-hour retention |
| HTTP API |
1 |
the pages' API, the web survey, partner endpoints; JWT authorizer; per-route throttles |
| S3 bucket + CloudFront distribution |
1 + 1 |
the console, results and survey pages; private bucket, origin access control, security headers |
| Cognito user pool, client, domain, two groups |
1 each |
sign-ins (not created with AuthMode=external) |
| S3 export bucket and hourly export function |
1 each |
only with DataExport=enabled: the day's responses as JSON lines and CSV for your warehouse |
| Glue database and table, three Athena saved queries |
1, 1, 3 |
only with DataExport=enabled: the export as an Athena table for QuickSight and SQL (free to create; Athena bills per query) |
| Genesys connector function, EventBridge rule, log group, alarm |
1 each |
only with GenesysEventBusName: finished Genesys Cloud interactions into SurveyCX |
| Zoom connector function, API route, log group, alarm |
1 each |
only with ZoomConnector=enabled: the signature-verified webhook and the engagement fetch |
| Connect setup function and custom resource |
1 each |
only with ConnectInstanceId and ConnectSetup=enabled: the Lambda association, flow module, two flows and the contact record stream target |
| Connectors function, five-minute schedule, Five9 webhook route, log group, alarm |
1 each |
only with Connectors=enabled: NICE CXone, Five9 and Talkdesk read from their APIs |
| EventBridge rules |
4 schedules + 1 event rule |
outbox sender, digest hourly, metering and themes daily; the Contact Lens evaluation event (with a Connect instance) |
| SNS topic (+ email subscription) |
1 |
alarms |
| CloudWatch alarms, dashboard, log groups |
12, 1, 8 |
operations |
| Amazon Lex bot, version, alias, Connect association |
1 each, only with SpokenComments=enabled |
spoken comments on voice |
Nothing is created outside the stack. delete-stack removes all of it, including the table and its backups (export first).
What the functions are allowed to do
Beyond their own table, stream, bucket and topic, the roles carry these service permissions, each needed for one feature:
| Permission |
Used by |
For |
connect:UpdateContactAttributes, connect:StartTaskContact, connect:DescribeContact |
API and ingest |
write scores onto the contact, open the follow-up Task, read a contact for the Task |
connect:DescribeContactEvaluation, connect:ListContactEvaluations on the instance |
evaluations |
read the score of a submitted Contact Lens evaluation |
ses:SendEmail |
digest |
the digest email |
sns:Publish on the alarm topic |
digest |
health findings to the same topic as the alarms |
connect:AssociateLambdaFunction, CreateContactFlowModule, UpdateContactFlowModuleContent, CreateContactFlow, UpdateContactFlowContent, ListQueues, AssociateInstanceStorageConfig and their List/Describe calls on the instance; lambda:AddPermission on the flow function; iam:CreateServiceLinkedRole |
Connect setup |
the zero-touch wiring at deploy time |
lambda:InvokeFunction on itself |
Zoom connector |
answers Zoom's webhook within its time limit and fetches the engagement in a second, asynchronous run |
polly:SynthesizeSpeech (Lex service role) |
Lex bot |
the bot's spoken replies (SpokenComments only) |
polly:SynthesizeSpeech |
API |
the Hear buttons in the survey builder: a prompt spoken in the IVR's voice |
polly:SynthesizeSpeech |
API |
the Hear buttons in the survey builder: a prompt spoken in the IVR's voice |
sms-voice:SendTextMessage, ses:SendEmail |
sender |
invitations |
comprehend:DetectSentiment, bedrock:InvokeModel, bedrock:Converse |
API, themes |
verbatim analysis (only with it enabled) |
aws-marketplace:MeterUsage, aws-marketplace:BatchMeterUsage |
metering |
the daily usage report |
cases:CreateCase, cases:CreateRelatedItem, cases:ListDomains, cases:ListTemplates, cases:GetTemplate |
flow, API, ingest |
a low score as a Connect Case, when configured |
profile:SearchProfiles, profile:UpdateProfile, profile:ListDomains |
flow, API, ingest |
the customer's last survey onto their Customer Profiles profile, when configured |
social-messaging:SendWhatsAppMessage |
sender |
WhatsApp invitations through End User Messaging Social, when configured |
ses:SendRawEmail |
digest function |
the scheduled PDF report as an email attachment |
s3:PutObject on the export bucket |
export function |
the nightly files (DataExport=enabled) |
cognito-idp:UpdateUserPoolClient, cognito-idp:DescribeUserPoolClient, cloudfront:CreateInvalidation |
site installer |
register the site URL as a sign-in callback, refresh the pages |
events:PutEvents on the default bus |
API |
one event per response |
ssm:GetParameters, ssm:PutParameter, ssm:DeleteParameter on /surveycx/<stack>/* |
functions that read settings |
webhook secrets, Arena key and Slack/Teams URLs in Parameter Store (free) |
The service actions that have no resource ARN (Marketplace metering, Comprehend, Bedrock model invocation, SES and SMS send) use * for the resource; everything else is scoped to the stack. The functions have no network access to anything but AWS APIs and the HTTPS endpoints you configure (webhooks, Arena).
What it costs to run
The stack idles at about $13 to $15 a month, almost all of it the Kinesis shard, and adds a fraction of a cent per survey. Figures below are US East list prices as of November 2026; your region may differ slightly.
| Component |
Idle, per month |
Per completed response |
| Kinesis stream, 1 shard |
$10.95 (+ $0.014 per million records) |
negligible |
| CloudWatch: 12 alarms, 1 dashboard, logs |
$1.20 for the alarms (the first 10 are free on many accounts), dashboard free (first three), logs $0.50/GB ingested (a few MB a day) |
negligible |
| Spoken comments (optional) |
nothing |
about $0.004 per spoken comment (Amazon Lex speech request) |
| Hear the survey (builder) |
nothing |
about $0.003 per preview (Polly neural, 200 characters; the first million characters a month are free in the first year) |
| "Was it resolved?" question (optional) |
nothing |
one SMS (about $0.008 in the US) or one email (about $0.0001) per completed survey it is asked after |
| DynamoDB on-demand |
storage $0.25/GB; a year of 5,000 responses a month is under 1 GB |
about 10 writes and reads, under $0.00002 |
| Lambda (arm64, 256 MB) |
free tier covers the schedules |
about 6 invocations, under $0.00003 |
| HTTP API |
nothing |
3 to 6 requests at $1 per million |
| CloudFront, S3 |
pennies |
pennies per thousand page loads |
| Cognito |
free up to 10,000 monthly active users, then $0.015 per user (Essentials tier) |
nothing |
| X-Ray |
free up to 100,000 traces a month, then $5 per million |
nothing at normal volumes |
| SMS invitation (optional) |
nothing |
about $0.0083 per segment in the US (AWS End User Messaging), plus your number's monthly fee |
| Email invitation (optional) |
nothing |
$0.10 per thousand (SES) |
| Sentiment (optional) |
nothing |
$0.0003 per comment (Comprehend, 3 units minimum) |
| Themes (optional) |
nothing |
a few cents a day for the daily Bedrock call, growing with the number of comments |
SurveyCX itself is billed by AWS Marketplace per completed response; see Billing. The console's Settings › Usage and billing card shows what was counted and reported each day.
Upgrading
Deploy the new version's template with the same stack name, passing SiteArchiveUrl for that version; CloudFormation changes only what differs and rolls back on failure. The previous template is the rollback. Release notes say when a version needs a parameter or a manual step. Tag deploys with Product=SurveyCX so Cost Explorer shows the stack's spend on its own.
Current as of version 0.20.2. See the release notes for what changed since.