AWS 微服务 Microservice
AWS Lambda
- Lambda Trigger
- Lambda Layer
- Lambda Destination
Bugs
当上面的代码连接到 API Gateway 服务时会出现类似下面的错误:
这是因为返回的格式有问题,将 status
改成 statusCode
即可。
AWS Step Functions
Trigger Settings
Trigger by invoking POST API endpoint on AWS API Gateway:
Lambda 中 dejavu 中文字体乱码问题
从官网下载 wkhtmltox-0.12.6-4.amazonlinux2_lambda.zip
,解压之后,将 wkhtmltox-0.12.6-4.amazonlinux2_lambda/fonts/dejavu/
中的字体文件删除。
下载 dejavusansyuanti.7z
,解压后将其中的 DejaVuSansYuanTi-Regular.ttf
和 DejaVuSansYuanTiCondensed-Regular.ttf
改名为 DejaVuSans.ttf
和 DejaVuSansCondensed.ttf
放入 wkhtmltox-0.12.6-4.amazonlinux2_lambda/fonts/dejavu/
中。
来源
- Creating a Step Functions API using API Gateway: https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-api-gateway.html
- Chinese/Japanese fonts are not rendering through AWS lambda function #4280: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4280
- 解决中文乱码的问题: https://www.cnblogs.com/chjbbs/p/3931355.html