aws-cdk - aws-apigateway RestApi deployOptions 失败
问题描述
所以我有一个问题,我可以使用以下声明创建一个 REST API
const restApi = new apigw.RestApi(this, 'Api_Name_Here', {
description: 'API Description'
});
我可以进行 cdk 部署,一切都很好。但是,当我添加 deployOptions 以指定阶段名称时,像这样
const restApi = new apigw.RestApi(this, 'Api_Name_here', {
description: 'API Description',
deployOptions: {
stageName: 'dev'
}
});
它失败了,出现以下错误
The final policy size (20806) is bigger than the limit (20480). (Service: AWSLambda; Status Code: 400; Error Code: PolicyLengthExceededException; Request ID: 4d13d438-93ab-441b-bf32-c7a0a442693e)
Function.addPermission (D:\proj\testing\restApi\cdk\node_modules\@aws-cdk\aws-lambda\lib\function-base.ts:191:5)
// snipped
我可以做些什么来缩短生成的任何策略,或者我可以以某种方式将其分解?
解决方案
推荐阅读
- excel - 为同一组的值查找最大值并在单独的列中指示该值
- reactjs - React hooks - 在滚动事件中更改状态不起作用
- mysql - ERROR 1265 (01000): 列的数据被截断
- docker - 如何自动获取可用端口?
- sql - 在 SQL (GBQ) 中选择整数的一部分
- flutter - 颤振确定线性进度条在值更改后没有动画
- r - Tidymodels,所有模型失败;model.frame.default 中的错误和秩不足拟合的预测可能会产生误导
- python - Python Tkinter GUI 表单在数据库中搜索,但某些字段可以为空
- point-cloud-library - 如何使用描述符比较点云中的相似性?
- laravel - 在 Laravel 中登录后重定向错误