Skip to content
GitHub Discord

Import existing resource

Import an existing AWS resource using the transform option with opts.import.

sst.config.ts
new sst.aws.Bucket("MyBucket", {
transform: {
bucket(args, opts) {
opts.import = "aws-import-my-bucket";
args.bucket = "aws-import-my-bucket";
args.forceDestroy = undefined;
},
},
});

View the full example.