Skip to content

🎥 Make videos programmatically with React

make sure to version match

Jonny Burgerfa9559cad05d
diff --git a/packages/docs/docs/lambda/go.md b/packages/docs/docs/lambda/go.md
index d396c209b9..3a884bb53d 100644
--- a/packages/docs/docs/lambda/go.md
+++ b/packages/docs/docs/lambda/go.md
@@ -9,6 +9,7 @@ To trigger a Lambda render using Go, you can use the Remotion Lambda Go client.
- You first need to [complete the Lambda setup](/docs/lambda/setup).
- Sending large input props (>200KB) is not supported with Go at the moment.
+- Always match the version of the Go client with the version of the Lambda function you deployed. Otherwise, calls will fail due to version mismatch!
```go title="main.go"
package main
@@ -20,7 +21,8 @@ import (
"github.com/go-playground/validator/v10"
"github.com/joho/godotenv"
- "github.com/remotion-dev/remotion/packages/lambda-go"
+ // Match the version with the version of your deployed functions
+ "github.com/remotion-dev/remotion/packages/lambda-go/v3.3.89"
)
type ValidationError struct {
@@ -62,7 +64,6 @@ func main() {
"data": "Let's play",
},
Composition: "main", // The composition to use
- Version: "3.3.78", // Specify the Remotion version to use
}
// Execute the render process
@@ -86,7 +87,7 @@ func main() {
}
// Get bucket information
- fmt.Printf("bucketName: %s\nRenderId: %s\n", renderResponse.BucketName, renderResponse.RenderId)
+ fmt.Printf("Bucket name: %s, Render ID: %s\n", renderResponse.BucketName, renderResponse.RenderId)
// Render Progress request
renderProgressInputRequest := remotionlambda.RenderConfig{
@@ -104,16 +105,10 @@ func main() {
}
// Get the overall render progress
- fmt.Printf("overallprogress: %f ", renderProgressResponse.OverallProgress)
-
+ fmt.Printf("Progress: %f", renderProgressResponse.OverallProgress)
}
-
```
-## Reference applications
-
-The project utilizes [remotion-app](https://github.com/alexfernandez803/remotion-serverless/tree/main/remotion-app), ensure that it is already deployed on your AWS Account.
-
## See also
- [Using Lambda without IAM user](/docs/lambda/without-iam)
diff --git a/packages/lambda-go/build.mjs b/packages/lambda-go/build.mjs
index b51a8cee7f..b024583bcc 100644
--- a/packages/lambda-go/build.mjs
+++ b/packages/lambda-go/build.mjs
@@ -17,4 +17,4 @@ if (!hasGo()) {
process.exit(0);
}
execSync("go mod tidy", { stdio: "inherit" });
-console.log("Linted lambda-go");
+console.log("Linted lambda-go!");
diff --git a/packages/lambda-go/internalops.go b/packages/lambda-go/internalops.go
index faeb587cde..c0fadfce74 100644
--- a/packages/lambda-go/internalops.go
+++ b/packages/lambda-go/internalops.go
@@ -20,17 +20,11 @@ func constructRenderInternals(options *RemotionOptions) (*renderInternalOptions,
return nil, validationErrors
}
- // set default version
- versionToUse := options.Version
- if options.Version == "" {
- versionToUse = VERSION
- }
-
internalParams := renderInternalOptions{
ServeUrl: options.ServeUrl,
InputProps: inputProps,
Composition: options.Composition,
- Version: versionToUse,
+ Version: VERSION,
FrameRange: options.FrameRange,
OutName: options.OutName,
AudioBitrate: options.AudioBitrate,
diff --git a/packages/lambda-go/models.go b/packages/lambda-go/models.go
index 5032252056..ed9c29bb0e 100644
--- a/packages/lambda-go/models.go
+++ b/packages/lambda-go/models.go
@@ -8,7 +8,6 @@ type RemotionOptions struct {
InputProps interface{} `json:"inputProps"`
Composition string `json:"composition" validate:"required"`
Codec string `json:"codec"`
- Version string `json:"version"`
ImageFormat string `json:"imageFormat"`
Crf int `json:"crf"`
EnvVariables interface{} `json:"envVariables"`