Resource handler returned message: "Request must be smaller than 5120 bytes for the UpdateFunctionConfiguration operation
[ERROR : ] Resource handler returned message: "Request must be smaller than 5120 bytes for the UpdateFunctionConfiguration operation
aws lambda 서비스에 배포할 때 나온 에러 메세지이다.
원인 : 환경 변수의 용량이 초과됨
아래 문서에 보면 함수의 환경변수의 사이즈가 4KB까지로 정의되어 있다.
Documents : https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
Lambda quotas - AWS Lambda
The Lambda documentation, log messages, and console use the abbreviation MB (rather than MiB) to refer to 1024 KB.
docs.aws.amazon.com
해결 방안 : 불필요한 환경 변수들을 삭제해주기
삭제할 환경 변수들이 없다면 serverless.yml 파일에서 함수 별로 사용하는 환경 변수를 설정하기
자세한 방법 적혀있는 깃헙 -> https://gist.github.com/dschep/7a9da1828466f2936cce3f363dacfa2a
serverless/serverless#3011 reproduced
serverless/serverless#3011 reproduced. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
용량 초과만 안하도록 하니 위의 오류는 잘 해결되었다.
이후에 또 다른 아래의 에러가 나왔다.
[AWS Lambda Error] : Unzipped size must be smaller than 262144000 bytes
해당 에러의 해결 방법 ↘
https://blckchainetc.tistory.com/369
AWS Lambda Error: Unzipped size must be smaller than 262144000 bytes
AWS Lambda Error: Unzipped size must be smaller than 262144000 bytes AWS Lambda 서버 배포 중 4KB 환경변수 크기 에러 해결 이후 또 나타난 에러 해결 방법 : 프로젝트 파일 크기를 크게 만드는..
blckchainetc.tistory.com
References : https://github.com/serverless/serverless/issues/3011
Travis CI fails on Request must be smaller than 5120 bytes for the UpdateFunctionConfiguration operation · Issue #3011 · serve
This is a Bug Report Description When I try to deploy serverless from Travis, I get error "Request must be smaller than 5120 bytes for the UpdateFunctionConfiguration operation." Deployme...
github.com