aws-cdk-lib.aws_s3_deployment.DeployTimeSubstitutedFileProps
interface DeployTimeSubstitutedFileProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.S3.Deployment.DeployTimeSubstitutedFileProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awss3deployment#DeployTimeSubstitutedFileProps |
![]() | software.amazon.awscdk.services.s3.deployment.DeployTimeSubstitutedFileProps |
![]() | aws_cdk.aws_s3_deployment.DeployTimeSubstitutedFileProps |
![]() | 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
Name | Type | Description |
---|---|---|
destination | IBucket | The S3 bucket to sync the contents of the zip file to. |
source | string | Path 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.