Skip to main content

CloudFront Invalidation

Stable

Type: DEVRAMPS:CLOUDFRONT:INVALIDATE

Category: deploy

Version: 1.0.0


Description

Invalidate paths on a CloudFront distribution and wait for completion.

Creates a CloudFront invalidation for the specified paths and polls until the invalidation completes. This ensures that edge caches are cleared before the pipeline proceeds. Commonly used after deploying static assets to S3 to ensure users receive the latest content.

Parameters

Required Parameters

ParameterTypeDescription
distribution_idstringCloudFront distribution ID.
pathsarray<string>Paths to invalidate (e.g., ["/*"] for all paths).

Optional Parameters

ParameterTypeDefaultDescription
account_idstring-AWS account ID. Defaults to stage account.
regionstring-AWS region. Defaults to stage region.
timeoutinteger15Maximum time to wait for invalidation completion in minutes.

Example Usage

- type: DEVRAMPS:CLOUDFRONT:INVALIDATE
name: Invalidate CDN Cache
params:
distribution_id: E1234567890ABC
paths:
- "/*"
timeout: 15