Your stack is deployed and CI/CD pushes changes automatically. Before real users hit it, harden the deployment with alarms, budgets, custom domains, gradual rollouts, and policy guardrails. Each topic below covers what to configure, why it matters, and links to its dedicated deep-dive.
Already hardened? Skip ahead to Resources to configure individual resource types, Observability for monitoring, or Managing Costs for spend control.
Alarms
Stacktape alarms monitor CloudWatch metrics and notify your team when thresholds are breached. Define alarms on individual resources in your stack config and deploy to apply them. The Stacktape Console shows deployed alarm state and history.
Alarm triggers cover the most critical failure modes: Lambda error rate and duration, database CPU/memory/storage/connections/latency, HTTP API Gateway error rate and latency, Application Load Balancer error rate and unhealthy targets, and SQS received-message count and not-empty alarms. Each alarm supports configurable evaluation windows — period length, how many periods to evaluate, and how many must breach before firing.
Without notificationChannels, alarms change state in CloudWatch but nobody gets paged. Always route alarms to at least one notification channel. Stacktape supports five channel types: Slack, Microsoft Teams, Discord, email, and custom webhooks.
This alarm fires when more than 5% of invocations fail in at least 2 out of 3 consecutive 60-second windows — filtering out isolated spikes while catching sustained problems. The evaluation block controls this: period sets each window to 60 seconds, evaluationPeriods: 3 looks at the last three windows, and breachedPeriods: 2 requires at least two to breach before firing. The email notification target ensures your on-call team is alerted immediately.
For production, most teams use Slack (type: 'slack' with conversationId and accessToken) or a custom webhook. See Alarms for all trigger types, notification channel configuration, and migration of legacy Console rules.
Budgets
Budgets catch surprise AWS bills. In the Stacktape Console, a budget sets a monthly spending limit for one connected AWS account and alerts your alert channels when the account's spend crosses percentages of it (80% and 100% by default). Forecast alerts, on by default, also warn you when AWS forecasts that the month's spend will cross a percentage.
A budget watches the whole AWS account. It cannot filter by project or stage. If you want separate limits for production and development, run them in separate AWS accounts. See Budgets for setup details.
Create a budget for every AWS account that runs production stages. Even a generous limit catches mistakes such as a runaway Lambda loop or an oversized database instance before they become expensive. Set the limit to your expected monthly bill and keep the default 80% and 100% alerts.
Custom domains
Stacktape web services support custom domains through the customDomains property. Provide your domain name, and Stacktape creates DNS records in Route53 and provisions TLS certificates automatically. The example below shows the most common case — a web service API. Other public resources are covered in the Custom domains guide.
Your domain must have a Route53 hosted zone in your AWS account. Use the stacktape domain add command to register a domain, or add the hosted zone manually in the AWS Console. See Custom domains for full setup details including domains registered with external providers.
Custom domains add no Stacktape cost, but Route53 hosted-zone and DNS-query charges apply in AWS. For production, custom domains are worth the cost — they give users a branded URL instead of an auto-generated AWS hostname, and TLS certificates are provisioned and renewed automatically.
Gradual deployments
Instead of switching all traffic to a new version instantly, gradual deployments shift traffic incrementally — catching regressions before they affect all users. Stacktape supports canary and linear strategies for Lambda functions and web services (and other container workloads — see Gradual deployments for the full list).
Lambda functions support nine deployment strategies. Canary strategies (Canary10Percent5Minutes, Canary10Percent10Minutes, Canary10Percent15Minutes, Canary10Percent30Minutes) send 10% of traffic to the new version first, then shift the rest after the specified wait period. Linear strategies (Linear10PercentEvery1Minute, Linear10PercentEvery2Minutes, Linear10PercentEvery3Minutes, Linear10PercentEvery10Minutes) shift 10% of traffic at regular intervals until complete. AllAtOnce provides an instant switch with no gradual rollout.
Lambda deployments also support optional beforeAllowTrafficFunction and afterTrafficShiftFunction hooks — references to Lambda functions in your config that run smoke tests before traffic begins shifting and validation after all traffic has moved. If the beforeAllowTrafficFunction hook signals failure, the deployment rolls back.
Web services and other container workloads expose gradual deployments through the deployment property, which requires application-load-balancer load balancing. Container workloads support five strategies: Canary10Percent5Minutes, Canary10Percent15Minutes, Linear10PercentEvery1Minutes, Linear10PercentEvery3Minutes, and AllAtOnce. Container deployments also support beforeAllowTrafficFunction and afterTrafficShiftFunction hooks. See Gradual deployments for rollback behavior and hook configuration.
Lambda function example
Canary10Percent5Minutes sends 10% of traffic to the new version for 5 minutes before shifting the rest. This is a good starting point for most production APIs — it validates with real traffic on a small slice before committing. If your service handles high traffic and you want more gradual rollout, consider Linear10PercentEvery3Minutes for a 30-minute complete rollout.
Web service example
Container gradual deployments require loadBalancing set to application-load-balancer — the default http-api-gateway does not support traffic shifting. The ALB adds a flat base cost (~$18/month), but enables gradual rollouts, WebSocket support, and top-level firewalls. See Gradual deployments for strategy comparisons.
Multi-region deployments
Deploy the same stack to multiple AWS regions for lower latency or regional compliance. Each region gets its own independent stage — deploy with --region eu-west-1 and --region us-east-1 as separate commands or CI pipelines. Stacktape does not automatically replicate data between regions; you handle cross-region data strategy (DynamoDB global tables, Aurora Global Database, or application-level replication).
Multi-region adds operational complexity and cost — you manage separate deployments, cross-region data consistency, and region-specific monitoring. Use it when you have users on multiple continents and latency matters, or when regulations require data residency in specific regions. For most apps, a single region with a CDN provides good global performance at lower cost. See Multi-region deployments for patterns and tradeoffs.
Guardrails
Guardrails define organization-wide policy rules that restrict what deployments can do — which stages and regions are allowed, what resource types and sizes are permitted, and which security settings are required. They prevent teams from deploying configurations that violate your standards.
Available guardrail types cover four categories:
| Category | Guardrail types |
|---|---|
| Deployment | Stage restriction, region restriction, command restriction, resource type restriction, resource count limit |
| Security | Require VPC-only databases, require WAF on application load balancers, require custom domains on web services and hosting buckets |
| Data protection | Require deletion protection on relational databases, require dead-letter queues on SQS queues |
| Resource limits | Function memory limit, function timeout limit, container CPU/memory limit, database engine restriction, database instance size restriction |
Guardrails are most valuable once your team has more than one person deploying, or when you run both production and development stages and want to enforce stricter rules on production. For solo developers or early-stage projects, you can skip guardrails and revisit when your team or compliance requirements grow. See Guardrails for configuration details and per-type documentation.
Verify before go-live
Before sending real traffic, run through these concrete checks:
-
Confirm alarms notify correctly. Trigger a test error in your function or service and verify the notification reaches your on-call channel. An alarm without
notificationChannelsfires silently in CloudWatch — check that every production alarm has at least one target configured. Usestacktape logsto confirm CloudWatch is receiving log data. -
Set a budget. Open Budgets in the Stacktape Console and create a budget for your production AWS account with a monthly limit matching your expected spend. Keep the default alerts at 80% and 100%, and keep forecast alerts on so you hear about spend trends before they reach the limit.
-
Verify your custom domain resolves. Open your custom domain in a browser and confirm the TLS certificate is valid (lock icon, no warnings). If you registered the domain with
stacktape domain add, the DNS records are managed automatically. If you manage DNS externally, verify the CNAME or alias record points to the correct AWS endpoint. -
Test a gradual deployment. Push a small change and monitor the deployment in the Stacktape Console. Confirm that traffic shifts gradually according to your chosen strategy. Use
stacktape logsto verify the new version is handling requests correctly. -
Review guardrails. Confirm deletion protection is required for production databases, VPC-only access is enforced where needed, and resource limits match your team's standards. See Guardrails for the full list of policy rules.
What's next
You've completed the Getting Started guide. Your stack is deployed, monitored, automated, and hardened. From here:
- Resources — the full resource catalogue with configuration guides
- Observability — logs, metrics, alarms, and alerting in depth
- Managing Costs — dashboards, budgets, and optimization
- Guardrails — deployment, security, and resource-limit policies
- Deploying & Lifecycle — deploys, previews, rollbacks, and multi-region patterns