AWS Amplify 是个笑话
我尝试将一个 Next.js 项目部署到 Amplify,但真的是一场灾难:
1. 环境变量在运行时不可用!我需要使用 grep 命令将环境变量写入 .env.production 文件中,在构建命令时才能使用。
2. 我终于有了环境变量(DATABASE_URL),但没有简单的方法让它访问我的 RDS 数据库。我搜索后发现了一些类似于“覆盖 Lambda VPC 配置……”的步骤。
完全浪费时间!
查看原文
I try to deploy a next.js project to amplify, and it's really a disaster:<p>1. environment variables are not available in run time! I need use grep command to write environment variables to a .env.production file at build command<p>2. I finally have env var (DATABASE_URL), then there is a no simple way to make it access my RDS database. I search and find something like "override a Lambda VPC configuration..." kind of steps<p>Totally waste of time!