aws-cdk-lib.aws_s3_deployment.DeployTimeSubstitutedFileProps

interface DeployTimeSubstitutedFileProps

LanguageType name
.NETAmazon.CDK.AWS.S3.Deployment.DeployTimeSubstitutedFileProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awss3deployment#DeployTimeSubstitutedFileProps
Javasoftware.amazon.awscdk.services.s3.deployment.DeployTimeSubstitutedFileProps
Pythonaws_cdk.aws_s3_deployment.DeployTimeSubstitutedFileProps
TypeScript (source)aws-cdk-lib » aws_s3_deployment » DeployTimeSubstitutedFileProps

Example

import * as lambda from 'aws-cdk-lib/aws-lambda';

declare const myLambdaFunction: lambda.Function;

new s3deploy.DeployTimeSubstitutedFile(this, 'MyFile', {
  source: 'my-file.yaml',
  destinationBucket: destinationBucket,
  substitutions: {
    variable-name: myLambdaFunction.functionName,
  },
});

Properties

NameTypeDescription
destinationBucketIBucketThe S3 bucket to sync the contents of the zip file to.
sourcestringPath to the user's local file.
substitutions{ [string]: string }User-defined substitutions to make in the file.

destinationBucket

Type: IBucket

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


source

Type: string

Path to the user's local file.


substitutions

Type: { [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.