Skip to content

--force-bucket-name not working with CLI commands #2421

@UmungoBungo

Description

@UmungoBungo

Looking at the code for removing a site with the cli (src/cli/commands/sites/rm.ts) it first gets a list of deployed sites, but the code within only gets sites from buckets with the remotionlambda- prefix. If you are forcing the bucket name, it may not have that prefix.

const region = getAwsRegion();
const deployedSites = await getSites({
    region,
});
for (const siteName of args) {
    const bucketName =
        parsedLambdaCli['force-bucket-name'] ??
        (await getOrCreateBucket({region})).bucketName;
    const site = deployedSites.sites.find((s) => s.id === siteName.trim());
    if (!site) {
        Log.error(
            `No site ${siteName.trim()} was found in your bucket ${bucketName}.`
        );
        return quit(1);
    }

I also found that the create command also doesn't work with --force-bucket-name. This is due to options.bypassBucketNameValidation not being set from the CLI.

pnpm exec remotion lambda sites create --force-bucket-name=not-remotion-name

image

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions