SecureProxy (SSL Termination)
Overview
SecureProxy provides automatic SSL/TLS termination as a separate ECS service using Traefik. Unlike CertWrapper which runs as a sidecar container, SecureProxy runs independently with its own dedicated Fargate resources, enabling zero-downtime deployments since application deployments don’t restart or redeploy the proxy service.
Purpose and Benefits
- Zero-Downtime Deployments: Application deployments don’t affect SSL termination & proxying
- Dedicated Resources: Runs on separate ECS Fargate service with its own CPU/memory
- Automatic HTTPS: Secure your application with automatically provisioned SSL certificates
- Let’s Encrypt Integration: Free SSL certificates with automatic renewal using Traefik
- Independent Scaling: Proxy service scales independently of application
vs. CertWrapper Comparison
| Feature | SecureProxy | CertWrapper |
|---|---|---|
| Architecture | Separate ECS Fargate service | Sidecar container |
| Sharing | Shared across multiple apps | One per app |
| Resources | Dedicated Fargate resources | Shares app CPU/RAM |
| Cost | Additional service costs | No additional compute cost |
| Deployment | Independent of app deploys | Restarts with app deploys |
| Use Case | Zero-downtime deployments | Cost-effective SSL |
| Proxy Technology | Traefik | Traefik |
CLI Usage
Create SecureProxy
Create a SecureProxy add-on with Traefik for SSL termination and routing
tapit create secureproxy acme_email=my@email.com [--ignore-existing]
Parameters
acme_email: Email address for Let’s Encrypt ACME notifications (required)--ignore-existing: Skip creation if a resource with the same name already exists (useful for idempotent scripts)
Create CertWrapper (alternative)
If you prefer a per-app sidecar approach instead:
Create a CertWrapper add-on for automatic SSL certificate management
tapit create certwrapper [acme_email=my@email.com] [--ignore-existing]
Parameters
acme_email: Email address for Let’s Encrypt ACME notifications--ignore-existing: Skip creation if a resource with the same name already exists (useful for idempotent scripts)
List and Show SecureProxy
List all add-ons attached to the app with their state and configuration
tapit list addons [-w|--wait]
Parameters
-w|--wait: Wait until all add-ons reach a stable state (fully ready or fully deleted); exits non-zero if any add-on is in a failed state
Show detailed information about a specific add-on
tapit show addon name=addon_name
Parameters
name: Name of the add-on to show (required)
Delete SecureProxy
Delete an add-on and all its associated AWS resources
tapit delete addon name=addon_name
Parameters
name: Name of the add-on to delete (required)
Application Configuration
Your application must be configured to listen on the port specified by the $PORT environment variable. SecureProxy (and CertWrapper) will handle TLS termination and forward HTTP requests to your application on this port.
For example, if your application is a Node.js Express app:
const port = process.env.PORT || 3000;
app.listen(port, () => {
console.log(`Server listening on port ${port}`);
});
Traffic Flow
Internet → SecureProxy (HTTPS:443) → Your Application (HTTP:$PORT)
- Client Request: Browser makes HTTPS request to your domain
- SSL Termination: SecureProxy decrypts the request
- Forwarding: Request is forwarded to your application on
$PORTover internal network - Response: Application response is encrypted and sent back to client
Domain Configuration
DNS Setup
Point your domain’s CNAME record to the app’s Tapitalee hostname (*.dns.tapitalee.net)
Multiple Domains
SecureProxy supports multiple domains and subdomains. Certificates are automatically requested for all domains pointing to the proxy.