A web service is a continuously running container with a public endpoint, making it ideal for hosting public APIs and websites.
Key features include:
- Automatic scaling: Scales based on CPU or memory usage.
- Zero-downtime deployments: Supports various deployment strategies, including blue/green, to ensure your service is always available.
- Flexible container images: Supports multiple ways to provide a container image, including automatic packaging for popular languages.
- Easy domain management: Simplifies using custom domains with SSL/TLS certificates.
- CDN integration: Can be fronted by a CDN to cache content and improve performance.
- Fully managed: No need to manage servers, operating systems, or virtual machines.
- Seamless connectivity: Easily connects to other resources in your stack.
Example
Here's an example of a simple web service that listens for HTTP requests.
Example server code in TypeScript.
Stacktape automatically injects a PORT environment variable into your container. Your application must bind to this port to receive traffic.
And here's the corresponding configuration:
Example web service configuration.
WebServiceAPI referencetypeRequired
Type: string "web-service"
properties.packagingRequired
Configures the container image for the service.
Type: ContainerWorkloadContainerPackaging
properties.resourcesRequired
CPU, memory, and compute engine for the container.
Type: ContainerWorkloadResourcesConfig
Two compute engines:
- Fargate (default): Serverless — just specify
cpuandmemory. - EC2: Specify
instanceTypesfor more control and potentially lower cost.
properties.cors
CORS settings. Overrides any CORS headers from your application.
Type: HttpApiCorsConfig
Only works with http-api-gateway load balancing (the default).
properties.customDomains
Custom domains (e.g., api.example.com). Stacktape auto-creates DNS records and TLS certificates.
Type: Array of DomainConfiguration
Your domain must be added as a Route53 hosted zone in your AWS account first.
properties.loadBalancing
How traffic reaches your containers. Affects pricing, features, and protocol support.
Type: WebServiceHttpApiGatewayLoadBalancing or WebServiceAlbLoadBalancing or WebServiceNlbLoadBalancing
http-api-gateway(default): Pay-per-request (~$1/million requests). Best for most apps. Cheapest at low traffic, but costs grow with volume.application-load-balancer: Flat ~$18/month + usage. Required for gradual deployments (deployment), firewalls (useFirewall), and WebSocket support. More cost-effective above ~500k requests/day. AWS Free Tier eligible.network-load-balancer: For non-HTTP traffic (TCP/TLS) like MQTT, game servers, or custom protocols. Requires explicitportsconfiguration. Does not support CDN, firewall, or gradual deployments.
properties.cdn
Put a CDN (CloudFront) in front of this service for caching and lower latency worldwide.
Type: CdnConfiguration
properties.alarms
Alarms for this service (merged with global alarms from the Stacktape Console).
Type: Array of ApplicationLoadBalancerAlarm or HttpApiGatewayAlarm
properties.disabledGlobalAlarms
Global alarm names to exclude from this service.
Type: Array of string
properties.deployment
Gradual traffic shifting for safe deployments (canary, linear, or all-at-once).
Type: ContainerWorkloadDeploymentConfig
Requires loadBalancing type application-load-balancer.
properties.useFirewall
Name of a web-app-firewall resource to protect this service from common web exploits.
Type: string
properties.environment
Environment variables injected into the container at runtime.
Type: Array of EnvironmentVar
Use for configuration like API keys, feature flags, or secrets.
Variables from connectTo (e.g., STP_MY_DATABASE_CONNECTION_STRING) are added automatically.
properties.logging
Logging configuration.
Type: ContainerWorkloadContainerLogging
Container output (stdout/stderr) is automatically sent to CloudWatch and retained for 90 days.
View logs with stacktape logs or in the Stacktape Console.
properties.scaling
Auto-scaling: add/remove container instances based on demand.
Type: ContainerWorkloadScaling
Traffic is automatically distributed across all running containers.
properties.internalHealthCheck
Health check that auto-replaces unhealthy containers.
Type: ContainerHealthCheck
If a container fails the health check, it's terminated and replaced automatically.
properties.stopTimeoutDefault: 2
Seconds to wait for graceful shutdown before force-killing the container.
Type: number
The container receives SIGTERM first, then SIGKILL after this timeout. Must be 2-120.
properties.enableRemoteSessions
Allow SSH-like access to running containers for debugging.
Type: boolean
Enables stacktape container:session to open an interactive shell inside the container.
Adds a small SSM agent that uses minimal CPU/memory.
properties.volumeMounts
Persistent EFS volumes shared across containers and restarts.
Type: Array of ContainerEfsMount
Data stored in EFS volumes persists even when containers are replaced. Multiple containers can mount the same volume. All data is encrypted in transit.
properties.sideContainers
Helper containers that run alongside the main container.
Type: Array of ServiceHelperContainer
run-on-init: Runs to completion before the main container starts (e.g., database migrations).always-running: Runs for the entire lifecycle (e.g., log forwarders, monitoring agents). Can reach the main container vialocalhost.
properties.usePrivateSubnetsWithNAT
Deploy in private subnets with a static outbound IP via NAT Gateway.
Type: boolean
The container won't have a public IP. All outbound traffic routes through a NAT Gateway, giving you a static IP you can whitelist in external services (APIs, payment gateways, etc.).
Configure the number of NAT Gateways in stackConfig.vpc.nat.
Adds cost: NAT Gateway ~$32/month + data processing fees.
properties.connectTo
Give this resource access to other resources in your stack.
Type: Array of string
List the names of resources this workload needs to communicate with. Stacktape automatically:
- Grants IAM permissions (e.g., S3 read/write, SQS send/receive)
- Opens network access (security group rules for databases, Redis)
- Injects environment variables with connection details:
STP_[RESOURCE_NAME]_[PARAM]
Example: connectTo: ["myDatabase", "myBucket"] gives this workload full access to both
resources and injects STP_MY_DATABASE_CONNECTION_STRING, STP_MY_BUCKET_NAME, etc.
properties.iamRoleStatements
Raw IAM policy statements for permissions not covered by connectTo.
Type: Array of StpIamRoleStatement
Added as a separate policy alongside auto-generated permissions. Use this for accessing AWS services directly (e.g., Rekognition, Textract, Bedrock).
overrides
Escape hatch to modify the underlying CloudFormation resources Stacktape creates.
Type: Object
Use dot-notation paths to override specific properties on any child resource.
Find resource logical IDs with stacktape stack-info --detailed.
overrides:
MyDbInstance:
Properties.StorageEncrypted: true
How it works
Stacktape uses AWS Elastic Container Service (ECS) to run your containers on either Fargate or EC2 instances.
- Fargate is a serverless compute engine that runs containers without requiring you to manage the underlying servers.
- EC2 instances are virtual servers that give you more control over the computing environment.
ECS services are self-healing, automatically replacing any container that fails. They also scale automatically based on the rules you define.
Traffic is routed to your containers using one of the following, depending on your configuration:
- HTTP API Gateway (default): A lightweight, cost-effective solution for HTTP APIs.
- Application Load Balancer (ALB): A more powerful load balancer that supports features like WebSockets and sticky sessions.
- Network Load Balancer (NLB): A high-performance load balancer that can handle millions of requests per second and supports protocols other than HTTP/S.
Stacktape automatically provisions and configures the chosen entry point for you.
When to use it
This table helps you choose the right container-based resource for your needs:
| Resource type | Description | Use-cases |
|---|---|---|
| web-service | A container with a public endpoint and URL. | Public APIs, websites |
| private-service | A container with a private endpoint, accessible only within your stack. | Private APIs, internal services |
| worker-service | A container that runs continuously but is not directly accessible. | Background processing, message queue consumers |
| multi-container-workload | A customizable workload with multiple containers, where you define the accessibility of each one. | Complex, multi-component services |
| batch-job | A container that runs a single job and then terminates. | One-off or scheduled data processing tasks |
Advantages
- Control over the environment: Runs any Docker image or an image built from a Dockerfile.
- Cost-effective for predictable loads: Cheaper than Lambda functions for services with steady traffic.
- Load-balanced and scalable: Automatically scales horizontally based on CPU and memory usage.
- Highly available: Runs across multiple Availability Zones to ensure resilience.
- Secure by default: The underlying environment is managed and secured by AWS.
Disadvantages
- Slower scaling: Adding new container instances can take several seconds to a few minutes, which is slower than the nearly-instant scaling of Lambda functions.
- Not fully serverless: Cannot scale down to zero. You pay for at least one running instance (starting at ~$8/month), even if it's idle.
Image
A web service runs a Docker image. You can provide this image in four ways:
- stacktape-image-buildpack: Automatically packages your code without needing a Dockerfile.
- external-buildpack: Uses external buildpacks to create an image.
- custom-dockerfile: Builds an image from your own Dockerfile.
- prebuilt-images: Uses an existing image from a container registry.
Environment variables
A list of environment variables to pass to the script or command.
Values can be:
- A static string, number, or boolean.
- The result of a custom directive.
- A reference to another resource's parameter using the `$ResourceParam` directive.
- A value from a secret using the `$Secret` directive.
EnvironmentVarAPI referenceParent:WebService or ServiceHelperContainernameRequired
Environment variable name (e.g., DATABASE_URL, API_KEY).
Type: string
valueRequired
Environment variable value. Numbers and booleans are converted to strings.
Type: string or number or boolean
Health check
Health checks monitor your container to ensure it's running correctly. If a container fails its health check, it's automatically terminated and replaced with a new one.
ContainerHealthCheckAPI referenceParent:WebService or ServiceHelperContainerhealthCheckCommandRequired
Command to check health. E.g., ["CMD-SHELL", "curl -f http://localhost/ || exit 1"]. Exit 0 = healthy.
Type: Array of string
intervalSecondsDefault: 30
Seconds between health checks (5-300).
Type: number
timeoutSecondsDefault: 5
Seconds before a check is considered failed (2-60).
Type: number
retriesDefault: 3
Consecutive failures before marking unhealthy (1-10).
Type: number
startPeriodSeconds
Grace period (seconds) before counting failures. Gives the container time to start (0-300).
Type: number
For example, this health check uses curl to send a request to the service every 20 seconds. If the request fails or takes longer than 5 seconds, the check is considered failed.
Shutdown
When a service instance is shut down (for example, during a deployment or when the stack is deleted), all of its containers receive a SIGTERM signal. This gives your application a chance to shut down gracefully.
By default, the application has 2 seconds to clean up before it's forcefully stopped with a SIGKILL signal. You can change this with the stopTimeout property (from 2 to 120 seconds).
Example of a cleanup function that runs before the container shuts down.
Logging
Anything your application writes to stdout or stderr is captured and stored in AWS CloudWatch.
You can view logs in a few ways:
- Stacktape Console: Find a direct link to the logs in the Stacktape Console.
- Stacktape CLI: Use the
stacktape logscommand to stream logs to your terminal. - AWS Console: Browse logs directly in the AWS CloudWatch console. The
stacktape stack-infocommand can provide a link.
Log storage can be expensive. To manage costs, you can configure retentionDays to automatically delete logs after a certain period.
ContainerWorkloadContainerLoggingAPI referenceParent:WebService or ServiceHelperContainerdisabled
Disable logging to CloudWatch.
Type: boolean
retentionDaysDefault: 90
How many days to keep logs.
Type: number ENUM
Possible values: 13571430609012015018036540054573118273653
logForwarding
Forward logs to an external service (Datadog, Highlight.io, or any HTTP endpoint).
Type: HttpEndpointLogForwarding or HighlightLogForwarding or DatadogLogForwarding
Uses Kinesis Data Firehose (~$0.03/GB). Failed deliveries go to a backup S3 bucket.
Forwarding logs
You can forward logs to third-party services. See Forwarding Logs for more information.
Compute resources
In the resources section, you configure the CPU, memory, and instance types for your service. You can run your containers using either Fargate or EC2 instances.
- Fargate is a serverless option that lets you run containers without managing servers. You only need to specify the
cpuandmemoryyour service requires. It's a good choice for applications that need to meet high security standards like PCI DSS Level 1 and SOC 2. - EC2 instances are virtual servers that give you more control. You choose the instance types that best fit your needs, and ECS places your containers on them.
Regardless of whether you use Fargate or EC2 instances, your containers run securely within a VPC.
Two compute engines:
- Fargate (default): Serverless — just specify
cpuandmemory. - EC2: Specify
instanceTypesfor more control and potentially lower cost.
ContainerWorkloadResourcesConfigAPI referenceParent:WebServicecpu
VCPUs for the workload (Fargate). Ignored when using instanceTypes.
Type: number ENUM
Possible values: 0.250.5124816
memory
Memory in MB. Must be compatible with the vCPU count on Fargate.
Type: number
Fargate valid combos: 0.25 vCPU → 512-2048 MB, 0.5 → 1024-4096, 1 → 2048-8192, 2 → 4096-16384, 4 → 8192-30720, 8 → 16384-61440, 16 → 32768-122880. For EC2: auto-detected from instance type if omitted.
instanceTypes
EC2 instance types for the workload (e.g., t3.medium, c6g.large). Use instead of cpu/memory.
Type: Array of string
First type in the list is preferred. Instances auto-scale and are refreshed weekly for patching.
Tip: specify a single type and omit cpu/memory for optimal sizing.
enableWarmPool
Keep pre-initialized EC2 instances ready for faster scaling. Only works with a single instance type.
Type: boolean
architectureDefault: 'x86_64'
CPU architecture for Fargate. arm64 is ~20% cheaper. Ignored when using instanceTypes.
Type: string ENUM
Possible values: arm64x86_64
Using Fargate
To use Fargate, specify cpu and memory in the resources section without including instanceTypes.
Example of a service running on Fargate.
Using EC2 instances
To use EC2 instances, specify a list of instanceTypes in the resources section.
First type in the list is preferred. Instances auto-scale and are refreshed weekly for patching.
Tip: specify a single type and omit cpu/memory for optimal sizing.
Example of a service running on EC2 instances.
Container placement on EC2
Stacktape tries to use your EC2 instances as efficiently as possible.
- If you specify
instanceTypeswithoutcpuandmemory, Stacktape configures each service instance to use the full resources of one EC2 instance. When the service scales out, a new EC2 instance is added for each new service instance. - If you specify
cpuandmemory, AWS will place multiple service instances on a single EC2 instance if there's enough capacity, maximizing utilization.
Default CPU and memory for EC2
- If
cpuis not specified, containers on an EC2 instance share its CPU capacity. - If
memoryis not specified, Stacktape sets the memory to the maximum amount available on the smallest instance type in yourinstanceTypeslist.
Using a warm pool
A warm pool keeps pre-initialized EC2 instances in a stopped state, allowing your service to scale out much faster. This is useful for handling sudden traffic spikes. You only pay for the storage of stopped instances, not for compute time.
To enable it, set enableWarmPool to true. This feature is only available when you specify exactly one instance type.
For more details, see the AWS Auto Scaling warm pools documentation.
Example of using a warm pool with EC2 instances.
Scaling
The scaling section lets you control how your service scales. You can set the minimum and maximum number of running instances and define a policy that triggers scaling actions.
ContainerWorkloadScalingAPI referenceParent:WebServiceminInstancesDefault: 1
Minimum running instances. Set to 0 is not supported — minimum is 1.
Type: number
maxInstancesDefault: 1
Maximum running instances. Traffic is distributed across all instances.
Type: number
scalingPolicy
When to scale: CPU and/or memory utilization targets.
Scaling policy
A scaling policy defines the CPU and memory thresholds that trigger scaling.
- Scaling out (adding instances): The service scales out if either the average CPU or memory utilization exceeds the target you set.
- Scaling in (removing instances): The service scales in only when both CPU and memory utilization are below their target values.
The scaling process is more aggressive when adding capacity than when removing it. This helps ensure your application can handle sudden increases in load, while scaling in more cautiously to prevent flapping (scaling in and out too frequently).
ContainerWorkloadScalingPolicyAPI referenceParent:ContainerWorkloadScalingkeepAvgCpuUtilizationUnderDefault: 80
Scale out when avg CPU exceeds this %, scale in when it drops below.
Type: number
keepAvgMemoryUtilizationUnderDefault: 80
Scale out when avg memory exceeds this %, scale in when it drops below.
Type: number
Example of a scaling configuration.
Storage
Each service instance has its own temporary, or ephemeral storage, with a fixed size of 20GB. This storage is deleted when the instance is removed. Different instances of the same service do not share their storage.
For persistent data storage, use Buckets.
Accessing other resources
By default, AWS resources cannot communicate with each other. Access must be granted using IAM permissions.
Stacktape automatically configures the necessary permissions for the services it manages. For example, it allows a web service to write logs to CloudWatch.
However, if your application needs to access other resources, you must grant permissions manually. You can do this in two ways:
Using connectTo
The connectTo property lets you grant access to other Stacktape-managed resources by simply listing their names. Stacktape automatically configures the required IAM permissions and injects connection details as environment variables into your service.
List the names of resources this workload needs to communicate with. Stacktape automatically:
- Grants IAM permissions (e.g., S3 read/write, SQS send/receive)
- Opens network access (security group rules for databases, Redis)
- Injects environment variables with connection details:
STP_[RESOURCE_NAME]_[PARAM]
Example: connectTo: ["myDatabase", "myBucket"] gives this workload full access to both
resources and injects STP_MY_DATABASE_CONNECTION_STRING, STP_MY_BUCKET_NAME, etc.
Using iamRoleStatements
For more granular control, you can provide a list of raw IAM role statements. These statements are added to the service's IAM role, allowing you to define precise permissions for any AWS resource.
StpIamRoleStatementAPI referenceParent:WebServiceResourceRequired
ARNs of the AWS resources this statement applies to. Use "*" for all resources.
Type: Array of string
Sid
Optional identifier for this statement (for readability).
Type: string
EffectDefault: Allow
Whether to allow or deny the specified actions.
Type: string
Action
AWS actions to allow or deny (e.g., s3:GetObject, sqs:SendMessage).
Type: Array of string
Condition
Type: UNSPECIFIED
Load balancing
The loadBalancing property configures how traffic is distributed to your containers.
http-api-gateway(default): Pay-per-request (~$1/million requests). Best for most apps. Cheapest at low traffic, but costs grow with volume.application-load-balancer: Flat ~$18/month + usage. Required for gradual deployments (deployment), firewalls (useFirewall), and WebSocket support. More cost-effective above ~500k requests/day. AWS Free Tier eligible.network-load-balancer: For non-HTTP traffic (TCP/TLS) like MQTT, game servers, or custom protocols. Requires explicitportsconfiguration. Does not support CDN, firewall, or gradual deployments.
Application Load Balancer
An Application Load Balancer (ALB) is a good choice when you need features like WebSocket support or sticky sessions, or if you expect high traffic volumes, as it can be more cost-effective than an HTTP API Gateway at scale.
WebServiceAlbLoadBalancingAPI referenceParent:WebServicetypeRequired
Type: string "application-load-balancer"
properties.healthcheckPathDefault: /
Path the load balancer pings to check container health.
Type: string
properties.healthcheckIntervalDefault: 5
Seconds between health checks.
Type: number
properties.healthcheckTimeoutDefault: 4
Seconds before a health check is considered failed.
Type: number
Network Load Balancer
A Network Load Balancer (NLB) is ideal for applications that require extreme performance, need to expose multiple ports, or use protocols other than HTTP/S.
WebServiceNlbLoadBalancingAPI referenceParent:WebServicetypeRequired
Type: string "network-load-balancer"
properties.portsRequired
Type: Array of WebServiceNlbLoadBalancingPort
properties.healthcheckPathDefault: /
Health check path (only used when healthCheckProtocol is HTTP).
Type: string
properties.healthcheckIntervalDefault: 5
Seconds between health checks (5-300).
Type: number
properties.healthcheckTimeoutDefault: 4
Seconds before a health check is considered failed (2-120).
Type: number
properties.healthCheckProtocolDefault: TCP
Health check protocol: TCP (port check) or HTTP (path check).
Type: string ENUM
Possible values: HTTPTCP
properties.healthCheckPort
Health check port. Defaults to the traffic port.
Type: number
Deployment strategies
By default, Stacktape uses a rolling update strategy to deploy new versions of your service. You can use the deployment property to choose a different strategy, such as blue/green.
Requires loadBalancing type application-load-balancer.
ContainerWorkloadDeploymentConfigAPI referenceParent:WebServicestrategyRequired
How traffic shifts to the new version during deployment.
Type: string ENUM
Possible values: AllAtOnceCanary10Percent15MinutesCanary10Percent5MinutesLinear10PercentEvery1MinutesLinear10PercentEvery3Minutes
Canary10Percent5Minutes: 10% first, then all after 5 min.Canary10Percent15Minutes: 10% first, then all after 15 min.Linear10PercentEvery1Minutes: 10% more every minute.Linear10PercentEvery3Minutes: 10% more every 3 minutes.AllAtOnce: Instant switch.
beforeAllowTrafficFunction
Lambda function to run before traffic shifts to the new version (for validation/smoke tests).
Type: string
afterTrafficShiftFunction
Lambda function to run after all traffic has shifted (for post-deployment checks).
Type: string
testListenerPort
ALB listener port for test traffic. Only needed with beforeAllowTrafficFunction and custom listeners.
Type: number
Hook functions
You can use hook functions to run checks before, during, or after a deployment.
Code for the
validateDeploymentfunction.
Test traffic listener
When using the beforeAllowTraffic hook, you can use a test listener to send traffic to the new version of your service before it receives production traffic. By default, the test listener is created on port 8080.
Code for the
testDeploymentfunction.
Default VPC connection
Some AWS services, like relational databases, must be deployed within a VPC. If your stack includes such resources, Stacktape automatically creates a default VPC and connects them to it.
Web services are connected to this default VPC by default, allowing them to communicate with other VPC-based resources without extra configuration.
To learn more, see the documentation on VPCs and resource accessibility.
CORS
Cross-Origin Resource Sharing (CORS) is a security feature that controls how web browsers handle requests to a different domain than the one the user is currently on.
If your frontend and backend are on different domains (e.g., mydomain.com and api.mydomain.com), you'll need to configure CORS.
If you are already handling CORS in your application code, you don't need to enable it in your Stacktape configuration. Also, the cors property cannot be used when the loadBalancing type is application-load-balancer.
You can enable CORS with a single line:
A web service with CORS enabled.
You can also customize the CORS headers:
Enable CORS. With no other options, uses permissive defaults (* origins, common headers).
HttpApiCorsConfigAPI referenceParent:WebServiceenabledRequired
Enable CORS. With no other options, uses permissive defaults (* origins, common headers).
Type: boolean
allowedOriginsDefault: *
Allowed origins (e.g., https://myapp.com). Use * for any origin.
Type: Array of string
allowedHeaders
Allowed request headers in CORS preflight.
Type: Array of string
allowedMethods
Allowed HTTP methods. Auto-detected from integrations if not set.
Type: Array of string ENUM
Possible values: *DELETEGETHEADOPTIONSPATCHPOSTPUT
allowCredentials
Allow cookies/auth headers in cross-origin requests.
Type: boolean
exposedResponseHeaders
Response headers accessible to browser JavaScript.
Type: Array of string
maxAge
How long (seconds) browsers can cache preflight responses.
Type: number
Custom domain names
You can use a custom domain for your web service. If you don't have one, you can register one through Stacktape.
If you already have a domain, you can either let Stacktape manage it (if you use AWS Route 53 for DNS) or use a third-party DNS provider.
For more details, see the Domains and Certificates page.
Using Stacktape to manage domains and certs
Your domain must be added as a Route53 hosted zone in your AWS account first.
DomainConfigurationAPI referenceParent:WebService or CdnConfigurationdomainNameRequired
Your domain name (e.g., mydomain.com or api.mydomain.com).
Type: string
Don't include the protocol (https://). The domain must have a Route53 hosted zone
in your AWS account, with your registrar's nameservers pointing to it.
Stacktape automatically creates a DNS record and provisions a free TLS certificate.
customCertificateArn
Use your own TLS certificate instead of the auto-generated one.
Type: string
Provide the ARN of an ACM certificate from your AWS account. Only needed if you have specific certificate requirements (e.g., EV/OV certs). By default, Stacktape provisions and renews free certificates automatically.
disableDnsRecordCreation
Skip DNS record creation for this domain.
Type: boolean
Set to true if you manage DNS records yourself (e.g., through Cloudflare or another DNS provider).
Stacktape will still provision the TLS certificate but won't touch your DNS.
Using a 3rd-party DNS
To use a domain from a provider like GoDaddy or Cloudflare:
- Create or import a TLS certificate for your domain in the AWS Certificate Manager console and copy its ARN.
- Add the
customDomainsconfiguration to your service, using the certificate ARN and disabling DNS record creation.
- After deploying, find the service's domain name in the Stacktape Console.
- In your DNS provider's dashboard, create a
CNAMEorALIASrecord pointing to the service's domain name.
CDN
You can place an AWS CloudFront CDN in front of your web service to cache content and reduce latency.
Put a CDN (CloudFront) in front of this service for caching and lower latency worldwide.
For more information, see the CDN documentation.
Firewall
You can protect your web service with a web application firewall (WAF).
Name of a web-app-firewall resource to protect this service from common web exploits.
To learn more, see the Web Application Firewall documentation.
Referenceable parameters
The following parameters can be easily referenced using $ResourceParam directive directive.
To learn more about referencing parameters, refer to referencing parameters.
Web service default domain name
- Usage:
$ResourceParam('<<resource-name>>', 'domain')
Web service default URL
- Usage:
$ResourceParam('<<resource-name>>', 'url')
Comma-separated list of custom domain names assigned to the Web Service (only available if you use custom domain names)
- Usage:
$ResourceParam('<<resource-name>>', 'customDomains')
Comma-separated list of custom domain name URLs (only available if you use custom domain names)
- Usage:
$ResourceParam('<<resource-name>>', 'customDomainUrls')
Default domain of the CDN distribution (only available if you DO NOT configure custom domain names for the CDN).
- Usage:
$ResourceParam('<<resource-name>>', 'cdnDomain')
Default url of the CDN distribution (only available if you DO NOT configure custom domain names for the CDN).
- Usage:
$ResourceParam('<<resource-name>>', 'cdnUrl')
Comma-separated list of custom domain names assigned to the CDN (only available if you configure custom domain names for the CDN).
- Usage:
$ResourceParam('<<resource-name>>', 'cdnCustomDomains')
Comma-separated list of custom domain name URLs of the CDN (only available if you configure custom domain names for the CDN).
- Usage:
$ResourceParam('<<resource-name>>', 'cdnCustomDomainUrls')
Pricing
When using Fargate, you are charged for:
- vCPU per hour: ~$0.04 - $0.07, depending on the region.
- Memory (GB) per hour: ~$0.004 - $0.008, depending on the region.
Usage is billed by the second, with a one-minute minimum. For more details, see AWS Fargate pricing.
API reference
StpIamRoleStatementAPI referenceParent:WebServiceResourceRequired
ARNs of the AWS resources this statement applies to. Use "*" for all resources.
Type: Array of string
Sid
Optional identifier for this statement (for readability).
Type: string
EffectDefault: Allow
Whether to allow or deny the specified actions.
Type: string
Action
AWS actions to allow or deny (e.g., s3:GetObject, sqs:SendMessage).
Type: Array of string
Condition
Type: UNSPECIFIED
WebServiceNlbLoadBalancingPortAPI referenceParent:WebServiceNlbLoadBalancingportRequired
Public port exposed by the load balancer.
Type: number
protocolDefault: TLS
Protocol: TLS (encrypted) or TCP (raw).
Type: string ENUM
Possible values: TCPTLS
containerPort
Port on the container that receives the traffic. Defaults to port.
Type: number