Stacktape
Stacktape


bucketSync()

Overview and basic usage


bucket:sync

Synchronizes the contents of a local directory with an S3 bucket.

You can specify the bucket in two ways:

  • Using Stacktape configuration: Provide the stage and resourceName. Stacktape will identify the bucket from the deployed stack and sync the directory specified in the configuration file.
  • Using bucket ID: Provide a valid bucketId (AWS physical resource ID or bucket name) and a sourcePath.

Files in the bucket that are not present in the source directory will be removed.



import { Stacktape } from "stacktape";
const stacktape = new Stacktape();
stacktape.bucketSync({
region: "<<region>>",
stage: "<<stage>>"
});

API reference

Arguments

region
Required
stage
Required
awsAccount
bucketId
config
configPath
currentWorkingDirectory
headersPreset
invalidateCdnCache
profile
projectName
resourceName
sourcePath
templateId

Contents