Skip to content

🎥 Make videos programmatically with React

adding docto create efs and vpc endpints

Shankhadeep Dey0842e0b1c1ec
diff --git a/packages/docs/docs/lambda.md b/packages/docs/docs/lambda.md
new file mode 100644
index 0000000000..f81775ad08
--- /dev/null
+++ b/packages/docs/docs/lambda.md
@@ -0,0 +1,62 @@
+---
+id: lambda
+sidebar_label: API - @remotion/lambda
+title: "@remotion/lambda"
+---
+
+No need to create security group, use default security group and VPC.
+
+## Create user role
+
+create user role with this access `AmazonS3FullAccess` `AmazonElasticFileSystemFullAccess` `AWSLambdaBasicExecutionRole` `AWSLambdaVPCAccessExecutionRole` `AmazonElasticFileSystemClientFullAccess`
+`AWSLambda_FullAccess`
+
+## Create EFS
+
+- go to efs [home](https://eu-central-1.console.aws.amazon.com/efs/home)
+- click on create file system
+- give a name and use default vpc
+- `Availability and Durability` is one zone
+- `Availability Zone` is eu-central-1a
+
+### Create access point for efs
+
+- click on the file system that was created
+- click on access point on bottom right and then create access point
+- give a root path (if root path is `/efs` then mount path in lambda will be `/mnt/efs`).
+- posix user: userID 1000, Group Id:1000,
+- Root directory creation permissions, Owner user ID: 1000, Owner group ID:1000, POSIX permissions: 777
+- click on create access point
+- now go to Network tab besides Access point tab, you will get your SubnetIds (should be 1 subnetId) and SecurityGroupIds
+
+on create-lambda it will be something like this
+```tsx
+VpcConfig: ENABLE_EFS
+ ? {
+ SubnetIds: ['subnet-be8fcd4'],
+ SecurityGroupIds: ['sg-8391fc'],
+ }
+ : undefined,
+FileSystemConfigs: ENABLE_EFS
+ ? [
+ {
+ Arn:
+ 'arn:aws:elasticfilesystem:eu-central-1:3330378317:access-point/fsap-05a31f7aad4e4781',
+ LocalMountPath: `/mnt/efs`,
+ },
+ ]
+ : undefined,
+```
+
+## Create VPC endpoints
+
+- go to VPC [home](https://eu-central-1.console.aws.amazon.com/vpc/home) and click on ENDPOINTS.
+- click on create endpoint and search s3.
+- click on this `com.amazonaws.eu-central-1.s3` and type is `Gateway`
+- use default VPC and policy `Full Access` and click on `Create Endpoint`
+- do same thing but for lambda endpoint
+- click on create endpoint and search lambda.
+- click on this `com.amazonaws.eu-central-1.lambda` and type is `Interface`
+- use default VPC and policy `Full Access` and click on `Create Endpoint`
+- Now you should have 2 endpoints one for `s3` and one for `lambda`
+
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index 86d45773f2..6ad154afe5 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -59,6 +59,7 @@ module.exports = {
],
},
"gif",
+ "lambda",
{
type: "category",
label: "API - @remotion/media-utils",