A Pulumi component that synchronizes the contents of a local folder to any Amazon S3 bucket, Azure Blob Storage container, or Google Cloud Storage bucket. Use this component to publish content easily to your cloud provider of choice.
By default, the Synced Folder component manages your files as individual Pulumi cloud resources (for example, as multiple aws:S3:BucketObjects), but you can opt out of this behavior by using the component’s managedObjects property:
constfolder=newsynced.S3BucketFolder("synced-folder",{path:"./my-folder",bucketName: bucket.bucket,acl: aws.s3.PublicReadAcl,// Set this property to false to manage files outside Pulumi.
managedObjects: false,});
folder=pulumi_synced_folder.S3BucketFolder("synced-folder",path="./my-folder",bucket_name=bucket.bucket,acl=s3.CannedAcl.PUBLIC_READ,# Set this property to false to manage files outside Pulumi.managed_objects=False,)
folder,err=synced.NewS3BucketFolder(ctx,"synced-folder",&synced.S3BucketFolderArgs{Path:pulumi.String("./my-folder"),BucketName:bucket.Bucket,Acl:s3.CannedAclPublicRead,// Set this property to false to manage files outside Pulumi.
ManagedObjects:pulumi.Bool(false),})
varfolder=newS3BucketFolder("synced-bucket-folder",newS3BucketFolderArgs{Path="./my-folder",BucketName=bucket.BucketName,Acl=(string)CannedAcl.PublicRead,// Set this property to false to manage files outside Pulumi.ManagedObjects=false,});
folder:type:synced-folder:index:S3BucketFolderproperties:path:./my-folderbucketName:${my-bucket.bucket}# Set this property to false to manage files outside Pulumi.managedObjects:false
When you do this, the component assumes you’ve installed the cloud provider’s official CLI — aws, az, or gcloud/gsutil, depending on the cloud — and uses the Pulumi Command provider to issue commands the CLI tool directly:
Files are one-way synchronized to the cloud, and any files that exist remotely but not locally are deleted from the cloud-storage container. All files are deleted from the cloud-storage container on pulumi destroy.
If the folder you’re syncing contains a large number of files (e.g., many thousands), you may want to consider using this option.
The component does not yet support switching seamlessly between managedObjects: true and managedObjects: false, however, so if you find after deploying a given folder with managed objects that you’d prefer to use unmanaged objects instead (or vice-versa), we recommend creating a second bucket/storage container and folder and removing the first. You can generally do this within the scope of a single program update. For example:
name:synced-folder-aws-yamlruntime:yamlresources:# Original bucket and synced-folder resources, using managed file objects.## my-first-bucket:# type: aws:s3:Bucket# properties:# acl: public-read# website:# indexDocument: index.html# errorDocument: error.html## my-first-synced-folder:# type: synced-folder:index:S3BucketFolder# properties:# path: ./stuff# bucketName: ${my-first-bucket.bucket}# acl: public-read# A new bucket and synced-folder using unmanaged file objects.changed-my-mind-bucket:type:aws:s3:Bucketproperties:acl:public-readchanged-my-mind-synced-folder:type:synced-folder:index:S3BucketFolderproperties:path:./stuffbucketName:${changed-my-mind-bucket.bucket}acl:public-readmanagedObjects:false
Synced Folder v0.12.4 published on Wednesday, Aug 13, 2025 by Pulumi