page:guides:astro:cdn assets

Deliver public assets through CDN for Astro

Summary

Cdn assets for a Astro app on Ample. Verified on Astro: a versioned, immutable-cached asset uploaded to a published bucket and served from the CDN URL. Build and start: astro build with the @astrojs/node standalone adapter then node ./dist/server/entry.mjs on the node-22 template.

Representative Queries

Resource Requirements

Infrastructure Requirements

  1. Compute
    Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
  2. CDN
    The CDN host serves objects from published buckets. It does not front app compute and is not a cache or key-value store.

Framework

Astro

Workload

Deliver public assets through CDN

Release Status

Published

Support Status

Verified

Execution Status

Ready

Prerequisites

Tested Configuration

Input Schema

{
  "type": "object",
  "required": ["env", "name", "path"],
  "properties": {
    "env": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Z][A-Z0-9_]*=.*$"
      },
      "maxItems": 50
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 63,
      "pattern": "^[a-z0-9-]+$"
    },
    "path": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    },
    "release_command": {
      "type": "string",
      "maxLength": 512
    }
  },
  "additionalProperties": false
}

Workflow Steps

  1. Build and start
    astro build with the @astrojs/node standalone adapter then node ./dist/server/entry.mjs on the node-22 template; the server must bind 0.0.0.0 on PORT.
  2. Publish a bucket for public assets
    Publish only the asset bucket; upload versioned keys with an immutable Cache-Control header and build URLs from its public URL.
    Command: ample bucket publish
  3. Verify
    Fetch the live URL and /p/versioned-static-assets on the example; on failure read the build and runtime logs.
    Command: ample logs --kind build

Examples

Success Checks

Limitations

Cost Estimate

Evidence Summary

Last Verified At

2026-09-20T03:31:44Z

MCP Binding

Unknowns

Formats

Next Actions

  1. Action: Browse the catalog index
    • Method: GET
    • Relative Path: /v1/catalog
  2. Action: Search published recipes by intent, stack and constraints
    • Method: POST
    • Relative Path: /v1/catalog/search
    • Parameters:
      • Body: {"limit":5, "query":"Deliver public assets through CDN for Astro"}
  3. Action: Prepare a side-effect-free deployment plan for an authorized project
    • Method: POST
    • Relative Path: /v1/catalog/plan
    • Parameters:
      • Body: {"inputs":{}, "projectId":"", "recipeId":"page:guides:astro:cdn-assets", "recipeRevision":"r1"}
  4. Action: Read the existing agent authentication setup
    • Method: GET
    • Relative Path: /mcp/setup
  5. Action: Browse Astro
    • Method: GET
    • Relative Path: /v1/catalog/nodes/stack%3Aframework-astro
  6. Action: Browse Add CDN
    • Method: GET
    • Relative Path: /v1/catalog/nodes/intent%3Aadd-cdn
  7. Action: Browse Versioned static assets
    • Method: GET
    • Relative Path: /v1/catalog/nodes/pattern%3Aversioned-static-assets