AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

DeployTimeSubstitutedFile

`DeployTimeSubstitutedFile` is an extension of `BucketDeployment` that allows users to upload individual files and specify to make substitutions in the file.

Import

import { DeployTimeSubstitutedFile } from 'aws-cdk-lib/aws-s3-deployment';

Or use the module namespace:

import * as s3_deployment from 'aws-cdk-lib/aws-s3-deployment';
// s3_deployment.DeployTimeSubstitutedFile

Properties

Configuration passed to the constructor as DeployTimeSubstitutedFileProps.

destinationBucketRequired
IBucket

The S3 bucket to sync the contents of the zip file to.

sourceRequired
string

Path to the user's local file.

substitutionsRequired
{ [key: string]: string }

User-defined substitutions to make in the file. Placeholders in the user's local file must be specified with double curly brackets and spaces. For example, if you use the key 'xxxx' in the file, it must be written as: {{ xxxx }} to be recognized by the construct as a substitution.

destinationKeyOptional
string

The object key in the destination bucket where the processed file would be written to.

Default: - Fingerprint of the file content would be used as object key

roleOptional
IRole

Execution role associated with this function.

Default: - A role is automatically created

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL2 (Higher-level)
Moduleaws-s3-deployment
Properties5

Related Constructs

External Links