Stacktape

Sign up



bucketSync()

Overview and basic usage


Synchronizes the contents of a specified directory to the specified bucket.


You have 2 options to sync the bucket:

  • using stacktape configuration, you must supply both stage and resourceName. Bucket id is then determined from the deployed stack and directory to sync from stacktape configuration file.
  • When syncing using bucket id, you must specify valid bucketId (AWS physical resource id, or "name" of the bucket) and sourcePath. Specified directory is then synced to the specified bucket. If the bucket is deployed using Stacktape, you can get bucketId using stack:info command.
  • Existing files that are not present in the source will be removed from the bucket.

Copy

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

Need help? Ask a question on Discord or info@stacktape.com.