Skip to main content
All CDN commands operate against your AWS account using the credentials in your environment.
Custom domain setup involves ACM certificate validation. Run wraps cdn verify to check DNS propagation and certificate status after adding DNS records.

wraps cdn init

Deploy CDN infrastructure (S3 bucket + CloudFront distribution) to your AWS account. Optionally configures a custom domain with an ACM certificate.
wraps cdn init
npx @wraps.dev/cli cdn init

# With a custom domain
wraps cdn init --domain cdn.yourapp.com

# Non-interactive
wraps cdn init --provider vercel --region us-east-1 --yes

# Preview changes without deploying
wraps cdn init --preview
-p, --provider
string
Hosting provider for your application. Accepted values: vercel, aws, railway, other. Determines how IAM roles and OIDC are configured.
-r, --region
string
AWS region to deploy the S3 bucket and supporting resources. The CloudFront distribution is always global.
-d, --domain
string
Custom CDN domain (e.g., cdn.yourapp.com). An ACM certificate is requested automatically. You will need to add DNS validation records before the custom domain becomes active.
--preview
boolean
Show a plan of all AWS resources that would be created without deploying.

wraps cdn status

Display the current state of your CDN infrastructure — S3 bucket, CloudFront distribution domain, custom domain, and configuration.
wraps cdn status
wraps cdn status --region us-east-1
-r, --region
string
AWS region to inspect.

wraps cdn verify

Check the DNS records and ACM certificate status for your custom CDN domain. Use this to confirm that DNS has propagated and the certificate is validated.
wraps cdn verify
wraps cdn verify --region us-east-1
-r, --region
string
AWS region of the CDN deployment.

wraps cdn upgrade

Attach a custom domain to the CloudFront distribution after the ACM certificate has been validated. Run wraps cdn verify first to confirm the certificate is ready.
wraps cdn upgrade
wraps cdn upgrade --region us-east-1 --yes
wraps cdn upgrade --preview
This command is specifically for the two-step custom domain flow: cdn init requests the certificate, and cdn upgrade attaches the validated domain to CloudFront.
-r, --region
string
AWS region of the deployment to upgrade.
-y, --yes
boolean
Skip confirmation prompts.
--preview
boolean
Show changes without applying them.

wraps cdn sync

Sync the deployed CDN infrastructure with the current configuration stored in local metadata. Use this to re-apply configuration after manual drift or to pick up config changes.
wraps cdn sync
wraps cdn sync --region us-east-1
-r, --region
string
AWS region of the deployment to sync.

wraps cdn destroy

Remove all CDN infrastructure deployed by Wraps from your AWS account — S3 bucket, CloudFront distribution, and ACM certificate.
wraps cdn destroy
wraps cdn destroy --force
wraps cdn destroy --preview
This is irreversible. The S3 bucket and all its contents will be deleted. The CloudFront distribution and any associated ACM certificates will also be removed.
-f, --force
boolean
Skip the confirmation prompt.
-r, --region
string
AWS region of the deployment to destroy.
--preview
boolean
Show which resources would be deleted without deleting them.

Build docs developers (and LLMs) love