stacktape 3.5.8 → 3.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tsconfig.bun-build.json +1 -0
- package/ai-docs/cli-ref/aws-profile-create.md +22 -0
- package/ai-docs/cli-ref/aws-profile-delete.md +22 -0
- package/ai-docs/cli-ref/aws-profile-list.md +20 -0
- package/ai-docs/cli-ref/aws-profile-update.md +22 -0
- package/ai-docs/cli-ref/bastion-session.md +29 -0
- package/ai-docs/cli-ref/bastion-tunnel.md +30 -0
- package/ai-docs/cli-ref/bucket-sync.md +30 -0
- package/ai-docs/cli-ref/cf-module-update.md +26 -0
- package/ai-docs/cli-ref/cf-rollback.md +28 -0
- package/ai-docs/cli-ref/codebuild-deploy.md +34 -0
- package/ai-docs/cli-ref/compile-template.md +25 -0
- package/ai-docs/cli-ref/container-session.md +30 -0
- package/ai-docs/cli-ref/debug-alarms.md +28 -0
- package/ai-docs/cli-ref/debug-aws-sdk.md +33 -0
- package/ai-docs/cli-ref/debug-container-exec.md +36 -0
- package/ai-docs/cli-ref/debug-dynamodb.md +35 -0
- package/ai-docs/cli-ref/debug-logs.md +34 -0
- package/ai-docs/cli-ref/debug-metrics.md +33 -0
- package/ai-docs/cli-ref/debug-opensearch.md +35 -0
- package/ai-docs/cli-ref/debug-redis.md +36 -0
- package/ai-docs/cli-ref/debug-sql.md +35 -0
- package/ai-docs/cli-ref/defaults-configure.md +29 -0
- package/ai-docs/cli-ref/defaults-list.md +20 -0
- package/ai-docs/cli-ref/delete.md +24 -0
- package/ai-docs/cli-ref/deploy.md +25 -0
- package/ai-docs/cli-ref/deployment-script-run.md +28 -0
- package/ai-docs/cli-ref/dev-stop.md +26 -0
- package/ai-docs/cli-ref/dev.md +45 -0
- package/ai-docs/cli-ref/domain-add.md +26 -0
- package/ai-docs/cli-ref/help.md +18 -0
- package/ai-docs/cli-ref/info-operations.md +22 -0
- package/ai-docs/cli-ref/info-stack.md +30 -0
- package/ai-docs/cli-ref/info-stacks.md +26 -0
- package/ai-docs/cli-ref/info-whoami.md +22 -0
- package/ai-docs/cli-ref/init.md +30 -0
- package/ai-docs/cli-ref/login.md +20 -0
- package/ai-docs/cli-ref/logout.md +18 -0
- package/ai-docs/cli-ref/mcp-add.md +22 -0
- package/ai-docs/cli-ref/mcp.md +20 -0
- package/ai-docs/cli-ref/org-create.md +24 -0
- package/ai-docs/cli-ref/org-delete.md +24 -0
- package/ai-docs/cli-ref/org-list.md +22 -0
- package/ai-docs/cli-ref/package-workloads.md +25 -0
- package/ai-docs/cli-ref/param-get.md +26 -0
- package/ai-docs/cli-ref/preview-changes.md +23 -0
- package/ai-docs/cli-ref/project-create.md +22 -0
- package/ai-docs/cli-ref/projects-list.md +22 -0
- package/ai-docs/cli-ref/rollback.md +28 -0
- package/ai-docs/cli-ref/script-run.md +29 -0
- package/ai-docs/cli-ref/secret-create.md +28 -0
- package/ai-docs/cli-ref/secret-delete.md +26 -0
- package/ai-docs/cli-ref/secret-get.md +26 -0
- package/ai-docs/cli-ref/upgrade.md +20 -0
- package/ai-docs/cli-ref/version.md +18 -0
- package/ai-docs/concept/connecting-resources.md +369 -0
- package/ai-docs/concept/directives.md +371 -0
- package/ai-docs/concept/extending-cloudformation.md +315 -0
- package/ai-docs/concept/overrides-and-transforms.md +352 -0
- package/ai-docs/concept/stages-and-environments.md +347 -0
- package/ai-docs/concept/typescript-config.md +447 -0
- package/ai-docs/concept/yaml-config.md +338 -0
- package/ai-docs/config-ref/_root.md +142 -0
- package/ai-docs/config-ref/application-load-balancer.md +1109 -0
- package/ai-docs/config-ref/astro-web.md +115 -0
- package/ai-docs/config-ref/aws-cdk-construct.md +68 -0
- package/ai-docs/config-ref/bastion.md +93 -0
- package/ai-docs/config-ref/batch-job.md +179 -0
- package/ai-docs/config-ref/bucket.md +348 -0
- package/ai-docs/config-ref/cdn.md +496 -0
- package/ai-docs/config-ref/custom-resource.md +80 -0
- package/ai-docs/config-ref/deployment-script.md +79 -0
- package/ai-docs/config-ref/dynamo-db-table.md +202 -0
- package/ai-docs/config-ref/edge-lambda-function.md +87 -0
- package/ai-docs/config-ref/efs-filesystem.md +72 -0
- package/ai-docs/config-ref/event-bus.md +63 -0
- package/ai-docs/config-ref/function.md +409 -0
- package/ai-docs/config-ref/hosting-bucket.md +171 -0
- package/ai-docs/config-ref/http-api-gateway.md +149 -0
- package/ai-docs/config-ref/http-endpoint.md +92 -0
- package/ai-docs/config-ref/kinesis-stream.md +97 -0
- package/ai-docs/config-ref/mongo-db-atlas-cluster.md +254 -0
- package/ai-docs/config-ref/multi-container-workload.md +399 -0
- package/ai-docs/config-ref/network-load-balancer.md +118 -0
- package/ai-docs/config-ref/nextjs-web.md +147 -0
- package/ai-docs/config-ref/nuxt-web.md +81 -0
- package/ai-docs/config-ref/open-search.md +206 -0
- package/ai-docs/config-ref/private-service.md +75 -0
- package/ai-docs/config-ref/redis-cluster.md +223 -0
- package/ai-docs/config-ref/relational-database.md +525 -0
- package/ai-docs/config-ref/remix-web.md +74 -0
- package/ai-docs/config-ref/sns-topic.md +69 -0
- package/ai-docs/config-ref/solidstart-web.md +75 -0
- package/ai-docs/config-ref/sqs-queue-not-empty.md +405 -0
- package/ai-docs/config-ref/sqs-queue.md +232 -0
- package/ai-docs/config-ref/state-machine.md +235 -0
- package/ai-docs/config-ref/sveltekit-web.md +81 -0
- package/ai-docs/config-ref/tanstack-web.md +75 -0
- package/ai-docs/config-ref/upstash-redis.md +59 -0
- package/ai-docs/config-ref/user-auth-pool.md +876 -0
- package/ai-docs/config-ref/web-app-firewall.md +212 -0
- package/ai-docs/config-ref/web-service.md +178 -0
- package/ai-docs/config-ref/worker-service.md +41 -0
- package/ai-docs/getting-started/console.md +232 -0
- package/ai-docs/getting-started/deployment.md +434 -0
- package/ai-docs/getting-started/dev-mode.md +118 -0
- package/ai-docs/getting-started/how-it-works.md +119 -0
- package/ai-docs/getting-started/intro.md +157 -0
- package/ai-docs/getting-started/using-with-ai.md +228 -0
- package/ai-docs/getting-started/workflow.md +197 -0
- package/ai-docs/index.json +1514 -0
- package/ai-docs/recipe/background-jobs.md +183 -0
- package/ai-docs/recipe/database-migrations.md +240 -0
- package/ai-docs/recipe/graphql-api.md +211 -0
- package/ai-docs/recipe/monorepo-setup.md +183 -0
- package/ai-docs/recipe/nextjs-full-stack.md +188 -0
- package/ai-docs/recipe/rest-api-with-database.md +156 -0
- package/ai-docs/recipe/scheduled-tasks.md +186 -0
- package/ai-docs/recipe/static-website.md +241 -0
- package/ai-docs/troubleshooting/cloudformation-stack-states.md +189 -0
- package/bin/stacktape.js +0 -12
- package/package.json +1 -1
- package/plain.d.ts +309 -54
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
docType: config-ref
|
|
3
|
+
title: Solid Start Web
|
|
4
|
+
resourceType: solidstart-web
|
|
5
|
+
tags:
|
|
6
|
+
- solidstart-web
|
|
7
|
+
- solidstart
|
|
8
|
+
- solid
|
|
9
|
+
source: types/stacktape-config/solidstart-web.d.ts
|
|
10
|
+
priority: 1
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Solid Start Web
|
|
14
|
+
|
|
15
|
+
Deploy a SolidStart SSR app with Lambda (AWS adapter), S3 for static assets, and CloudFront CDN.
|
|
16
|
+
|
|
17
|
+
Resource type: `solidstart-web`
|
|
18
|
+
|
|
19
|
+
## TypeScript Definition
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
/**
|
|
23
|
+
* #### Deploy a SolidStart SSR app with Lambda (AWS adapter), S3 for static assets, and CloudFront CDN.
|
|
24
|
+
*/
|
|
25
|
+
interface SolidStartWeb {
|
|
26
|
+
type: 'solidstart-web';
|
|
27
|
+
properties: SolidStartWebProps;
|
|
28
|
+
overrides?: ResourceOverrides;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface SolidStartWebProps extends ResourceAccessProps {
|
|
32
|
+
/**
|
|
33
|
+
* #### Directory containing your `app.config.ts`. For monorepos, point to the SolidStart workspace.
|
|
34
|
+
*
|
|
35
|
+
* @default "."
|
|
36
|
+
*/
|
|
37
|
+
appDirectory?: string;
|
|
38
|
+
/**
|
|
39
|
+
* #### Override the default `vinxi build` command.
|
|
40
|
+
*/
|
|
41
|
+
buildCommand?: string;
|
|
42
|
+
/**
|
|
43
|
+
* #### Environment variables for the SSR function. Use `$ResourceParam()` or `$Secret()` for dynamic values.
|
|
44
|
+
*/
|
|
45
|
+
environment?: EnvironmentVar[];
|
|
46
|
+
/**
|
|
47
|
+
* #### Attach custom domains with auto-managed DNS records and TLS certificates.
|
|
48
|
+
*
|
|
49
|
+
* ---
|
|
50
|
+
*
|
|
51
|
+
* **Prerequisite:** A Route 53 hosted zone for your domain must exist in your AWS account.
|
|
52
|
+
*/
|
|
53
|
+
customDomains?: DomainConfiguration[];
|
|
54
|
+
/**
|
|
55
|
+
* #### Customize the SSR Lambda function (memory, timeout, VPC, logging).
|
|
56
|
+
*/
|
|
57
|
+
serverLambda?: SsrWebServerLambdaConfig;
|
|
58
|
+
/**
|
|
59
|
+
* #### Name of a `web-app-firewall` resource to protect this app. Firewall `scope` must be `cdn`.
|
|
60
|
+
*/
|
|
61
|
+
useFirewall?: string;
|
|
62
|
+
/**
|
|
63
|
+
* #### Dev server config for `stacktape dev`. Defaults to `vinxi dev`.
|
|
64
|
+
*/
|
|
65
|
+
dev?: SsrWebDevConfig;
|
|
66
|
+
/**
|
|
67
|
+
* #### Set custom headers (e.g., `Cache-Control`) for static files matching a pattern.
|
|
68
|
+
*/
|
|
69
|
+
fileOptions?: DirectoryUploadFilter[];
|
|
70
|
+
/**
|
|
71
|
+
* #### CDN cache controls for SSR routes and specific path patterns.
|
|
72
|
+
*/
|
|
73
|
+
cdn?: SsrWebCdnConfig;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
---
|
|
2
|
+
docType: config-ref
|
|
3
|
+
title: Alarm Definition Base
|
|
4
|
+
resourceType: sqs-queue-not-empty
|
|
5
|
+
tags:
|
|
6
|
+
- sqs-queue-not-empty
|
|
7
|
+
source: types/stacktape-config/alarms.d.ts
|
|
8
|
+
priority: 1
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Alarm Definition Base
|
|
12
|
+
|
|
13
|
+
Resource type: `sqs-queue-not-empty`
|
|
14
|
+
|
|
15
|
+
## TypeScript Definition
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
type AlarmUserIntegration = MsTeamsIntegration | SlackIntegration | EmailIntegration;
|
|
19
|
+
|
|
20
|
+
interface AlarmDefinitionBase {
|
|
21
|
+
/**
|
|
22
|
+
* #### How long and how often to evaluate the metric before triggering.
|
|
23
|
+
*
|
|
24
|
+
* ---
|
|
25
|
+
*
|
|
26
|
+
* Controls the evaluation window (period), how many periods to look at, and how many must breach
|
|
27
|
+
* the threshold to fire the alarm. Useful for filtering out short spikes.
|
|
28
|
+
*/
|
|
29
|
+
evaluation?: AlarmEvaluation;
|
|
30
|
+
/**
|
|
31
|
+
* #### Where to send notifications when the alarm fires — Slack, MS Teams, or email.
|
|
32
|
+
*/
|
|
33
|
+
notificationTargets?: AlarmUserIntegration[];
|
|
34
|
+
/**
|
|
35
|
+
* #### Custom alarm description used in notification messages and the AWS console.
|
|
36
|
+
*/
|
|
37
|
+
description?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface AlarmDefinition extends AlarmDefinitionBase {
|
|
41
|
+
/**
|
|
42
|
+
* #### A unique name for this alarm (e.g., `api-error-rate`, `db-cpu-high`).
|
|
43
|
+
*/
|
|
44
|
+
name: string;
|
|
45
|
+
/**
|
|
46
|
+
* #### The metric and threshold that fires this alarm.
|
|
47
|
+
*
|
|
48
|
+
* ---
|
|
49
|
+
*
|
|
50
|
+
* `type` selects what to monitor (error rate, CPU, latency, etc.) and `properties` set the threshold.
|
|
51
|
+
*/
|
|
52
|
+
trigger: AlarmTrigger;
|
|
53
|
+
/**
|
|
54
|
+
* #### Only activate this alarm for these services. If omitted, applies to all services.
|
|
55
|
+
*/
|
|
56
|
+
forServices?: string[];
|
|
57
|
+
/**
|
|
58
|
+
* #### Only activate this alarm for these stages (e.g., `production`). If omitted, applies to all stages.
|
|
59
|
+
*/
|
|
60
|
+
forStages?: string[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface StpAlarm extends AlarmDefinition {
|
|
64
|
+
nameChain: string[];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface ApplicationLoadBalancerAlarm extends AlarmDefinitionBase {
|
|
68
|
+
trigger: ApplicationLoadBalancerAlarmTrigger;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
interface HttpApiGatewayAlarm extends AlarmDefinitionBase {
|
|
72
|
+
trigger: HttpApiGatewayAlarmTrigger;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface LambdaAlarm extends AlarmDefinitionBase {
|
|
76
|
+
trigger: LambdaAlarmTrigger;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface RelationalDatabaseAlarm extends AlarmDefinitionBase {
|
|
80
|
+
trigger: RelationalDatabaseAlarmTrigger;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface SqsQueueAlarm extends AlarmDefinitionBase {
|
|
84
|
+
trigger: SqsQueueAlarmTrigger;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type ApplicationLoadBalancerAlarmTrigger =
|
|
88
|
+
| ApplicationLoadBalancerErrorRateTrigger
|
|
89
|
+
| ApplicationLoadBalancerUnhealthyTargetsTrigger
|
|
90
|
+
| ApplicationLoadBalancerCustomTrigger;
|
|
91
|
+
type SqsQueueAlarmTrigger = SqsQueueReceivedMessagesCountTrigger | SqsQueueNotEmptyTrigger;
|
|
92
|
+
type LambdaAlarmTrigger = LambdaErrorRateTrigger | LambdaDurationTrigger;
|
|
93
|
+
type HttpApiGatewayAlarmTrigger = HttpApiGatewayErrorRateTrigger | HttpApiGatewayLatencyTrigger;
|
|
94
|
+
type RelationalDatabaseAlarmTrigger =
|
|
95
|
+
| RelationalDatabaseReadLatencyTrigger
|
|
96
|
+
| RelationalDatabaseWriteLatencyTrigger
|
|
97
|
+
| RelationalDatabaseCPUUtilizationTrigger
|
|
98
|
+
| RelationalDatabaseFreeStorageTrigger
|
|
99
|
+
| RelationalDatabaseFreeMemoryTrigger
|
|
100
|
+
| RelationalDatabaseConnectionCountTrigger;
|
|
101
|
+
|
|
102
|
+
type AlarmTrigger =
|
|
103
|
+
| LambdaErrorRateTrigger
|
|
104
|
+
| LambdaDurationTrigger
|
|
105
|
+
| RelationalDatabaseReadLatencyTrigger
|
|
106
|
+
| RelationalDatabaseWriteLatencyTrigger
|
|
107
|
+
| RelationalDatabaseCPUUtilizationTrigger
|
|
108
|
+
| RelationalDatabaseFreeStorageTrigger
|
|
109
|
+
| RelationalDatabaseFreeMemoryTrigger
|
|
110
|
+
| RelationalDatabaseConnectionCountTrigger
|
|
111
|
+
| HttpApiGatewayErrorRateTrigger
|
|
112
|
+
| HttpApiGatewayLatencyTrigger
|
|
113
|
+
| ApplicationLoadBalancerErrorRateTrigger
|
|
114
|
+
| ApplicationLoadBalancerUnhealthyTargetsTrigger
|
|
115
|
+
| ApplicationLoadBalancerCustomTrigger
|
|
116
|
+
| SqsQueueReceivedMessagesCountTrigger
|
|
117
|
+
| SqsQueueNotEmptyTrigger;
|
|
118
|
+
|
|
119
|
+
type AlarmTriggerType = AlarmTrigger['type'];
|
|
120
|
+
|
|
121
|
+
interface AlarmEvaluation {
|
|
122
|
+
/**
|
|
123
|
+
* #### Duration of one evaluation period in seconds. Must be a multiple of 60.
|
|
124
|
+
*
|
|
125
|
+
* @default 60
|
|
126
|
+
*/
|
|
127
|
+
period?: number;
|
|
128
|
+
/**
|
|
129
|
+
* #### How many recent periods to evaluate. Prevents alarms from firing on short spikes.
|
|
130
|
+
*
|
|
131
|
+
* ---
|
|
132
|
+
*
|
|
133
|
+
* Example: set to `5` with `breachedPeriods: 3` — the alarm fires only if the threshold is breached
|
|
134
|
+
* in at least 3 of the last 5 periods.
|
|
135
|
+
*
|
|
136
|
+
* @default 1
|
|
137
|
+
*/
|
|
138
|
+
evaluationPeriods?: number;
|
|
139
|
+
/**
|
|
140
|
+
* #### How many periods (within `evaluationPeriods`) must breach the threshold to fire the alarm.
|
|
141
|
+
*
|
|
142
|
+
* ---
|
|
143
|
+
*
|
|
144
|
+
* Must be ≤ `evaluationPeriods`.
|
|
145
|
+
*
|
|
146
|
+
* @default 1
|
|
147
|
+
*/
|
|
148
|
+
breachedPeriods?: number;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
interface SqsQueueNotEmptyTrigger {
|
|
152
|
+
/**
|
|
153
|
+
* #### Fires when the SQS queue has unprocessed messages.
|
|
154
|
+
*
|
|
155
|
+
* ---
|
|
156
|
+
*
|
|
157
|
+
* The queue is considered "not empty" if any of these are non-zero: visible messages,
|
|
158
|
+
* in-flight messages, messages received, or messages sent.
|
|
159
|
+
*/
|
|
160
|
+
type: 'sqs-queue-not-empty';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
interface SqsQueueReceivedMessagesCountTrigger {
|
|
164
|
+
type: 'sqs-queue-received-messages-count';
|
|
165
|
+
properties: SqsQueueReceivedMessagesCountTriggerProps;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
interface SqsQueueReceivedMessagesCountTriggerProps extends TriggerWithCustomComparison, TriggerWithCustomStatFunction {
|
|
169
|
+
/**
|
|
170
|
+
* #### Fires when received message count crosses this threshold.
|
|
171
|
+
*
|
|
172
|
+
* ---
|
|
173
|
+
*
|
|
174
|
+
* Default: fires if **average** messages received per period > `thresholdCount`.
|
|
175
|
+
* Customize with `statistic` and `comparisonOperator`.
|
|
176
|
+
*/
|
|
177
|
+
thresholdCount: number;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
interface ApplicationLoadBalancerErrorRateTrigger {
|
|
181
|
+
type: 'application-load-balancer-error-rate';
|
|
182
|
+
properties: ApplicationLoadBalancerErrorRateTriggerProps;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
interface ApplicationLoadBalancerErrorRateTriggerProps extends TriggerWithCustomComparison {
|
|
186
|
+
/**
|
|
187
|
+
* #### Fires when 4xx/5xx error rate exceeds this percentage.
|
|
188
|
+
*
|
|
189
|
+
* ---
|
|
190
|
+
*
|
|
191
|
+
* Example: `5` fires the alarm if more than 5% of requests return errors.
|
|
192
|
+
*/
|
|
193
|
+
thresholdPercent: number;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
interface ApplicationLoadBalancerUnhealthyTargetsTrigger {
|
|
197
|
+
type: 'application-load-balancer-unhealthy-targets';
|
|
198
|
+
properties: ApplicationLoadBalancerUnhealthyTargetsTriggerProps;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
interface ApplicationLoadBalancerUnhealthyTargetsTriggerProps extends TriggerWithCustomComparison {
|
|
202
|
+
/**
|
|
203
|
+
* #### Fires when the percentage of unhealthy targets exceeds this value.
|
|
204
|
+
*
|
|
205
|
+
* ---
|
|
206
|
+
*
|
|
207
|
+
* If the load balancer has multiple target groups, the alarm fires if *any* group breaches the threshold.
|
|
208
|
+
*/
|
|
209
|
+
thresholdPercent: number;
|
|
210
|
+
/**
|
|
211
|
+
* #### Only monitor health of these target container services. If omitted, monitors all targets.
|
|
212
|
+
*
|
|
213
|
+
* ---
|
|
214
|
+
*
|
|
215
|
+
* Only services actually targeted by the load balancer can be listed.
|
|
216
|
+
*/
|
|
217
|
+
onlyIncludeTargets?: string[];
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
interface HttpApiGatewayErrorRateTrigger {
|
|
221
|
+
type: 'http-api-gateway-error-rate';
|
|
222
|
+
properties: HttpApiGatewayErrorRateTriggerProps;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
interface HttpApiGatewayErrorRateTriggerProps extends TriggerWithCustomComparison {
|
|
226
|
+
/**
|
|
227
|
+
* #### Fires when 4xx/5xx error rate exceeds this percentage.
|
|
228
|
+
*/
|
|
229
|
+
thresholdPercent: number;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
interface HttpApiGatewayLatencyTrigger {
|
|
233
|
+
type: 'http-api-gateway-latency';
|
|
234
|
+
properties: HttpApiGatewayLatencyTriggerProps;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
interface HttpApiGatewayLatencyTriggerProps extends TriggerWithCustomComparison, TriggerWithCustomStatFunction {
|
|
238
|
+
/**
|
|
239
|
+
* #### Fires when request-to-response latency exceeds this value (ms).
|
|
240
|
+
*
|
|
241
|
+
* ---
|
|
242
|
+
*
|
|
243
|
+
* Default: fires if **average** latency > threshold. Customize with `statistic` and `comparisonOperator`.
|
|
244
|
+
*/
|
|
245
|
+
thresholdMilliseconds: number;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
interface LambdaErrorRateTrigger {
|
|
249
|
+
type: 'lambda-error-rate';
|
|
250
|
+
properties: LambdaErrorRateTriggerProps;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
interface LambdaErrorRateTriggerProps extends TriggerWithCustomComparison {
|
|
254
|
+
/**
|
|
255
|
+
* #### Fires when the percentage of failed Lambda invocations exceeds this value.
|
|
256
|
+
*/
|
|
257
|
+
thresholdPercent: number;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
interface LambdaDurationTrigger {
|
|
261
|
+
type: 'lambda-duration';
|
|
262
|
+
properties: LambdaDurationTriggerProps;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
interface LambdaDurationTriggerProps extends TriggerWithCustomComparison, TriggerWithCustomStatFunction {
|
|
266
|
+
/**
|
|
267
|
+
* #### Fires when Lambda execution time exceeds this value (ms).
|
|
268
|
+
*
|
|
269
|
+
* ---
|
|
270
|
+
*
|
|
271
|
+
* Default: fires if **average** duration > threshold. Customize with `statistic` and `comparisonOperator`.
|
|
272
|
+
*/
|
|
273
|
+
thresholdMilliseconds: number;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
interface RelationalDatabaseFreeMemoryTrigger {
|
|
277
|
+
type: 'database-free-memory';
|
|
278
|
+
properties: RelationalDatabaseFreeMemoryTriggerProps;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
interface RelationalDatabaseFreeMemoryTriggerProps extends TriggerWithCustomComparison, TriggerWithCustomStatFunction {
|
|
282
|
+
/**
|
|
283
|
+
* #### Fires when free memory drops below this value (MB).
|
|
284
|
+
*
|
|
285
|
+
* ---
|
|
286
|
+
*
|
|
287
|
+
* Default: fires if **average** free memory < threshold. Customize with `statistic` and `comparisonOperator`.
|
|
288
|
+
*/
|
|
289
|
+
thresholdMB: number;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
interface RelationalDatabaseReadLatencyTrigger {
|
|
293
|
+
type: 'database-read-latency';
|
|
294
|
+
properties: RelationalDatabaseReadLatencyTriggerProps;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
interface RelationalDatabaseReadLatencyTriggerProps extends TriggerWithCustomComparison, TriggerWithCustomStatFunction {
|
|
298
|
+
/**
|
|
299
|
+
* #### Fires when average read I/O latency exceeds this value (seconds).
|
|
300
|
+
*/
|
|
301
|
+
thresholdSeconds: number;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
interface RelationalDatabaseWriteLatencyTrigger {
|
|
305
|
+
type: 'database-write-latency';
|
|
306
|
+
properties: RelationalDatabaseWriteLatencyTriggerProps;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface RelationalDatabaseWriteLatencyTriggerProps
|
|
310
|
+
extends TriggerWithCustomComparison,
|
|
311
|
+
TriggerWithCustomStatFunction {
|
|
312
|
+
/**
|
|
313
|
+
* #### Fires when average write I/O latency exceeds this value (seconds).
|
|
314
|
+
*/
|
|
315
|
+
thresholdSeconds: number;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
interface RelationalDatabaseCPUUtilizationTrigger {
|
|
319
|
+
type: 'database-cpu-utilization';
|
|
320
|
+
properties: RelationalDatabaseCPUUtilizationTriggerProps;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
interface RelationalDatabaseCPUUtilizationTriggerProps
|
|
324
|
+
extends TriggerWithCustomComparison,
|
|
325
|
+
TriggerWithCustomStatFunction {
|
|
326
|
+
/**
|
|
327
|
+
* #### Fires when CPU utilization exceeds this percentage.
|
|
328
|
+
*/
|
|
329
|
+
thresholdPercent: number;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
interface RelationalDatabaseFreeStorageTrigger {
|
|
333
|
+
type: 'database-free-storage';
|
|
334
|
+
properties: RelationalDatabaseFreeStorageTriggerProps;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
interface RelationalDatabaseFreeStorageTriggerProps extends TriggerWithCustomComparison, TriggerWithCustomStatFunction {
|
|
338
|
+
/**
|
|
339
|
+
* #### Fires when free disk space drops below this value (MB).
|
|
340
|
+
*
|
|
341
|
+
* ---
|
|
342
|
+
*
|
|
343
|
+
* Default: fires if **minimum** free storage < threshold.
|
|
344
|
+
*/
|
|
345
|
+
thresholdMB: number;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
interface RelationalDatabaseConnectionCountTrigger {
|
|
349
|
+
type: 'database-connection-count';
|
|
350
|
+
properties: RelationalDatabaseConnectionCountTriggerProps;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
interface RelationalDatabaseConnectionCountTriggerProps
|
|
354
|
+
extends TriggerWithCustomComparison,
|
|
355
|
+
TriggerWithCustomStatFunction {
|
|
356
|
+
/**
|
|
357
|
+
* #### Fires when the number of active database connections exceeds this value.
|
|
358
|
+
*/
|
|
359
|
+
thresholdCount: number;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
interface TriggerWithCustomStatFunction {
|
|
363
|
+
/**
|
|
364
|
+
* #### How to aggregate metric values within each period: `avg`, `sum`, `min`, `max`, `p90`, `p95`, `p99`.
|
|
365
|
+
*
|
|
366
|
+
* @default avg
|
|
367
|
+
*/
|
|
368
|
+
statistic?: StatisticFunction;
|
|
369
|
+
}
|
|
370
|
+
interface TriggerWithCustomComparison {
|
|
371
|
+
/**
|
|
372
|
+
* #### How to compare the metric value against the threshold.
|
|
373
|
+
*
|
|
374
|
+
* @default GreaterThanThreshold
|
|
375
|
+
*/
|
|
376
|
+
comparisonOperator?: ComparisonOperator;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
type StatisticFunction = 'avg' | 'p90' | 'p95' | 'p99' | 'min' | 'max' | 'sum';
|
|
380
|
+
|
|
381
|
+
type ComparisonOperator =
|
|
382
|
+
| 'GreaterThanThreshold'
|
|
383
|
+
| 'GreaterThanOrEqualToThreshold'
|
|
384
|
+
| 'LessThanThreshold'
|
|
385
|
+
| 'LessThanOrEqualToThreshold';
|
|
386
|
+
|
|
387
|
+
type AlarmNotificationEventRuleInput = {
|
|
388
|
+
description: string;
|
|
389
|
+
time: string;
|
|
390
|
+
alarmAwsResourceName: string;
|
|
391
|
+
stackName: string;
|
|
392
|
+
alarmConfig: AlarmDefinition;
|
|
393
|
+
affectedResource: AlarmAffectedResourceInfo;
|
|
394
|
+
comparisonOperator: ComparisonOperator;
|
|
395
|
+
measuringUnit: string;
|
|
396
|
+
alarmLink: string;
|
|
397
|
+
statFunction: string;
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
type AlarmAffectedResourceInfo = {
|
|
401
|
+
displayName: string;
|
|
402
|
+
link: string;
|
|
403
|
+
logLink?: string;
|
|
404
|
+
};
|
|
405
|
+
```
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
---
|
|
2
|
+
docType: config-ref
|
|
3
|
+
title: Sqs Queue
|
|
4
|
+
resourceType: sqs-queue
|
|
5
|
+
tags:
|
|
6
|
+
- sqs-queue
|
|
7
|
+
- sqs
|
|
8
|
+
- queue
|
|
9
|
+
- message-queue
|
|
10
|
+
source: types/stacktape-config/sqs-queues.d.ts
|
|
11
|
+
priority: 1
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Sqs Queue
|
|
15
|
+
|
|
16
|
+
Message queue for decoupling services. Producers send messages, consumers process them at their own pace.
|
|
17
|
+
|
|
18
|
+
Fully managed, serverless, pay-per-message. Use for background processing, task queues, or buffering between services.
|
|
19
|
+
|
|
20
|
+
Resource type: `sqs-queue`
|
|
21
|
+
|
|
22
|
+
## TypeScript Definition
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
/**
|
|
26
|
+
* #### Message queue for decoupling services. Producers send messages, consumers process them at their own pace.
|
|
27
|
+
*
|
|
28
|
+
* ---
|
|
29
|
+
*
|
|
30
|
+
* Fully managed, serverless, pay-per-message. Use for background processing, task queues, or buffering between services.
|
|
31
|
+
*/
|
|
32
|
+
interface SqsQueue {
|
|
33
|
+
type: 'sqs-queue';
|
|
34
|
+
properties?: SqsQueueProps;
|
|
35
|
+
overrides?: ResourceOverrides;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface SqsQueueProps {
|
|
39
|
+
/**
|
|
40
|
+
* #### Delay (in seconds) before new messages become visible to consumers. Range: 0–900.
|
|
41
|
+
*
|
|
42
|
+
* ---
|
|
43
|
+
*
|
|
44
|
+
* Useful for introducing a buffer, e.g., waiting for related data to be available before processing.
|
|
45
|
+
*
|
|
46
|
+
* @default 0
|
|
47
|
+
*/
|
|
48
|
+
delayMessagesSecond?: number;
|
|
49
|
+
/**
|
|
50
|
+
* #### Maximum message size in bytes. Range: 1,024 (1 KB) to 262,144 (256 KB).
|
|
51
|
+
*
|
|
52
|
+
* ---
|
|
53
|
+
*
|
|
54
|
+
* Messages larger than this limit are rejected. For payloads over 256 KB, store the data in S3 and send the reference.
|
|
55
|
+
*
|
|
56
|
+
* @default 262144
|
|
57
|
+
*/
|
|
58
|
+
maxMessageSizeBytes?: number;
|
|
59
|
+
/**
|
|
60
|
+
* #### How long unprocessed messages stay in the queue before being deleted. Range: 60s to 1,209,600s (14 days).
|
|
61
|
+
*
|
|
62
|
+
* ---
|
|
63
|
+
*
|
|
64
|
+
* Default is 4 days (345,600s). Increase if consumers might fall behind or be temporarily offline.
|
|
65
|
+
*
|
|
66
|
+
* @default 345600
|
|
67
|
+
*/
|
|
68
|
+
messageRetentionPeriodSeconds?: number;
|
|
69
|
+
/**
|
|
70
|
+
* #### Seconds the queue waits for messages before returning an empty response. Range: 0–20.
|
|
71
|
+
*
|
|
72
|
+
* ---
|
|
73
|
+
*
|
|
74
|
+
* Set to `1`–`20` to enable long polling, which reduces costs by making fewer API calls.
|
|
75
|
+
* With short polling (`0`), the consumer gets an immediate (often empty) response and must poll again.
|
|
76
|
+
*
|
|
77
|
+
* Recommended: `20` for most workloads — it's the most cost-effective.
|
|
78
|
+
*
|
|
79
|
+
* @default 0
|
|
80
|
+
*/
|
|
81
|
+
longPollingSeconds?: number;
|
|
82
|
+
/**
|
|
83
|
+
* #### How long (seconds) a message is hidden from other consumers after being received. Range: 0–43,200 (12 hours).
|
|
84
|
+
*
|
|
85
|
+
* ---
|
|
86
|
+
*
|
|
87
|
+
* After a consumer picks up a message, it must delete it before this timeout expires — otherwise it becomes
|
|
88
|
+
* visible again and can be processed by another consumer (duplicate processing).
|
|
89
|
+
*
|
|
90
|
+
* Set this higher than your expected processing time. If your tasks take 2 minutes, use at least 150 seconds.
|
|
91
|
+
*
|
|
92
|
+
* @default 30
|
|
93
|
+
*/
|
|
94
|
+
visibilityTimeoutSeconds?: number;
|
|
95
|
+
/**
|
|
96
|
+
* #### Creates a FIFO queue that guarantees message order and exactly-once delivery.
|
|
97
|
+
*
|
|
98
|
+
* ---
|
|
99
|
+
*
|
|
100
|
+
* Use when processing order matters (e.g., financial transactions, sequential workflows).
|
|
101
|
+
* FIFO queues have lower throughput (~300 msg/s without batching, ~3,000 with) compared to standard queues.
|
|
102
|
+
*
|
|
103
|
+
* Requires either `contentBasedDeduplication: true` or a `MessageDeduplicationId` on each message.
|
|
104
|
+
*
|
|
105
|
+
* @default false
|
|
106
|
+
*/
|
|
107
|
+
fifoEnabled?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* #### Enables high-throughput mode for FIFO queues (up to ~70,000 msg/s per queue).
|
|
110
|
+
*
|
|
111
|
+
* ---
|
|
112
|
+
*
|
|
113
|
+
* Messages are partitioned by `MessageGroupId` — order is guaranteed within each group but not across groups.
|
|
114
|
+
* Requires `fifoEnabled: true`.
|
|
115
|
+
*/
|
|
116
|
+
fifoHighThroughput?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* #### Automatically deduplicates messages based on their content (SHA-256 hash of the body).
|
|
119
|
+
*
|
|
120
|
+
* ---
|
|
121
|
+
*
|
|
122
|
+
* Within the 5-minute deduplication window, identical messages are delivered only once.
|
|
123
|
+
* Saves you from having to generate a unique `MessageDeduplicationId` for each message.
|
|
124
|
+
* Requires `fifoEnabled: true`.
|
|
125
|
+
*/
|
|
126
|
+
contentBasedDeduplication?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* #### Moves messages that fail processing too many times to a dead-letter queue for inspection.
|
|
129
|
+
*
|
|
130
|
+
* ---
|
|
131
|
+
*
|
|
132
|
+
* After `maxReceiveCount` failed attempts, the message is automatically moved to a separate queue
|
|
133
|
+
* so you can investigate and reprocess it. Prevents poison messages from blocking the queue.
|
|
134
|
+
*/
|
|
135
|
+
redrivePolicy?: SqsQueueRedrivePolicy;
|
|
136
|
+
/**
|
|
137
|
+
* #### Additional alarms associated with this resource.
|
|
138
|
+
*
|
|
139
|
+
* ---
|
|
140
|
+
*
|
|
141
|
+
* These alarms will be merged with any alarms configured globally in the [console](https://console.stacktape.com/alarms).
|
|
142
|
+
*/
|
|
143
|
+
alarms?: SqsQueueAlarm[];
|
|
144
|
+
/**
|
|
145
|
+
* #### Disables globally configured alarms for this resource.
|
|
146
|
+
*
|
|
147
|
+
* ---
|
|
148
|
+
*
|
|
149
|
+
* Provide a list of alarm names as configured in the [console](https://console.stacktape.com/alarms).
|
|
150
|
+
*/
|
|
151
|
+
disabledGlobalAlarms?: string[];
|
|
152
|
+
/**
|
|
153
|
+
* #### Custom access-control statements added to the queue's resource policy.
|
|
154
|
+
*
|
|
155
|
+
* ---
|
|
156
|
+
*
|
|
157
|
+
* These are merged with policies Stacktape auto-generates. Use to grant cross-account access or allow
|
|
158
|
+
* specific AWS services (e.g., SNS) to send messages to this queue.
|
|
159
|
+
*/
|
|
160
|
+
policyStatements?: SqsQueuePolicyStatement[];
|
|
161
|
+
/**
|
|
162
|
+
* #### A list of event sources that trigger message delivery to this queue.
|
|
163
|
+
*
|
|
164
|
+
* ---
|
|
165
|
+
*
|
|
166
|
+
* Currently supports EventBridge event bus integration for delivering events directly to the queue.
|
|
167
|
+
*/
|
|
168
|
+
events?: SqsQueueEventBusIntegration[];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
interface SqsQueuePolicyStatement {
|
|
172
|
+
/**
|
|
173
|
+
* #### `Allow` or `Deny` access for the specified actions and principal.
|
|
174
|
+
*/
|
|
175
|
+
Effect: string;
|
|
176
|
+
/**
|
|
177
|
+
* #### SQS actions to allow or deny. E.g., `["sqs:SendMessage"]` or `["sqs:*"]`.
|
|
178
|
+
*/
|
|
179
|
+
Action: string[];
|
|
180
|
+
/**
|
|
181
|
+
* #### Optional conditions for when this statement applies (e.g., restrict by source ARN or IP range).
|
|
182
|
+
*/
|
|
183
|
+
Condition?: any;
|
|
184
|
+
/**
|
|
185
|
+
* #### Who gets access: AWS account ID, IAM ARN, or `"*"` for everyone. E.g., `{ "Service": "sns.amazonaws.com" }`.
|
|
186
|
+
*/
|
|
187
|
+
Principal: any;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* #### Routes events from an EventBridge event bus to this queue when they match a specified pattern.
|
|
192
|
+
*/
|
|
193
|
+
interface SqsQueueEventBusIntegration {
|
|
194
|
+
type: 'event-bus';
|
|
195
|
+
/**
|
|
196
|
+
* #### Properties of the integration
|
|
197
|
+
*/
|
|
198
|
+
properties: SqsQueueEventBusIntegrationProps;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
interface SqsQueueEventBusIntegrationProps extends EventBusIntegrationProps {
|
|
202
|
+
/**
|
|
203
|
+
* #### Message group ID for FIFO queues. Required when the target queue has `fifoEnabled: true`.
|
|
204
|
+
*
|
|
205
|
+
* ---
|
|
206
|
+
*
|
|
207
|
+
* Messages in the same group are processed in strict order. Different groups can be processed in parallel.
|
|
208
|
+
*/
|
|
209
|
+
messageGroupId?: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
interface SqsQueueRedrivePolicy {
|
|
213
|
+
/**
|
|
214
|
+
* #### Name of another `sqs-queue` in your config to use as the dead-letter queue.
|
|
215
|
+
*/
|
|
216
|
+
targetSqsQueueName?: string;
|
|
217
|
+
/**
|
|
218
|
+
* #### ARN of an external SQS queue to use as the dead-letter queue. Use when the DLQ is in another stack or account.
|
|
219
|
+
*/
|
|
220
|
+
targetSqsQueueArn?: string;
|
|
221
|
+
/**
|
|
222
|
+
* #### How many times a message can be received (and fail) before being moved to the dead-letter queue.
|
|
223
|
+
*
|
|
224
|
+
* ---
|
|
225
|
+
*
|
|
226
|
+
* A typical starting value is `3`–`5`. Set lower for fast-failing workloads, higher for retryable transient errors.
|
|
227
|
+
*/
|
|
228
|
+
maxReceiveCount: number;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
type SqsQueueReferencableParam = 'arn' | 'name' | 'url';
|
|
232
|
+
```
|