2022年2月停电
更新 2022/02/06:
问题现在已经解决。你的 Lambda 函数应该可以正常工作。我们建议大家回去使用 ARM64 Lambda。我们将与 AWS 支持咨询如何防止将来出现类似问题。
🌐 The problem is now solved. Your Lambda functions should work as normal. We recommend everyone to go back to use ARM64 Lambdas. We will consult with AWS support on how to prevent issues like this in the future.
2022年2月3日,AWS对其Lambda微型虚拟机进行了更改,这导致Remotion Lambda无法使用。本文档包含受影响用户的信息。
🌐 On February 3rd 2022, AWS made a change to their Lambda micro-VMs that breaks Remotion Lambda. This document contains information for affected users.
热修复解决方案
🌐 Hotfix solution
将你的 Lambda 函数升级到最新版本,并使用 x86_64 架构部署它们。
通过命令行接口(CLI):
🌐 Via CLI:
npx remotion lambda functions deploy --architecture=x86_64通过 Node.JS:
🌐 Via Node.JS:
示例
🌐 Example
import {deployFunction} from '@remotion/lambda';
const {functionName} = await deployFunction({
region: 'us-east-1',
timeoutInSeconds: 120,
memorySizeInMb: 1024,
createCloudWatchLogGroup: true,
architecture: 'x86_64',
});
console.log(functionName);警告
🌐 Caveat
x86_64 版本不包含日语/中文/韩语的字体!由于 x86_64 版本的二进制文件更大,我们超出了文件限制,不得不删除最大的字体以保持在 AWS 的范围内。
🌐 The x86_64 version does not contain fonts for Japanese/Chinese/Korean! Since the binaries are bigger on the x86_64 version, we exceeded the file limit and had to delete the biggest font in order to stay within the AWS bounds.
x86_64 也更慢,并且成本/性能比大约高 30%。
🌐 x86_64 is also slower and has about a 30% higher cost/performance ratio.
AWS 缓解
🌐 AWS mitigation
我们已联系了 AWS,希望很快能收到答复。
🌐 We contacted AWS and hope to receive an answer soon.
长期解决方案
🌐 Long-term solution
ARM64 是首选和默认的解决方案。一旦问题解决,我们建议每个人切换回去。
🌐 ARM64 is the preferred and default solution. Once the problem is solved, we recommend everyone to switch back.
联系
🌐 Contact
如果你有问题,请加入我们 Discord 通道的讨论。
🌐 Join the discussion in our Discord channel if you have questions.