Skip to content

🎥 Make videos programmatically with React

Display render cost on error

Patric Salvisbergea523b2f3f2a
diff --git a/packages/lambda/src/cli/commands/render/render.ts b/packages/lambda/src/cli/commands/render/render.ts
index ed815405d6..0624b88c20 100644
--- a/packages/lambda/src/cli/commands/render/render.ts
+++ b/packages/lambda/src/cli/commands/render/render.ts
@@ -371,6 +371,14 @@ export const renderCommand = async (args: string[], remotionRoot: string) => {
await CliInternals.handleCommonError(errorWithStackFrame, logLevel);
}
+ Log.info(
+ '\n\nAccured costs until the error was thrown: ',
+ newStatus.costs.accruedSoFar.toString(),
+ 'USD. '
+ );
+ Log.info(
+ 'This is only an estimate and does not include charges for other AWS services! \n\n'
+ );
quit(1);
}
}