Capítulo 475 de 988
Gets an array of Remotion projects in your S3 account.
const {sites, buckets} = await getSites({
region: 'eu-central-1',
});
for (const site of sites) {
console.log(site.id); // A unique ID for referring to that project
console.log(site.bucketName); // In which bucket the site resides in.
console.log(site.lastModified); // A unix timestamp, but may also be null
console.log(site.sizeInBytes); // Size of all contents in the folder
console.log(site.serveUrl); // URL of the deployed site that you can pass to `renderMediaOnLambda()`
console.log(site.version); // The Remotion version of the site, or null
}
for (const bucket of buckets) {
console.log(bucket.region); // 'eu-central-1'
console.log(bucket.name); // The name of the S3 bucket.
console.log(bucket.creationDate); // A unix timestamp of when the site was created.
}