Not able to update lambda log format using CLI

0

I'm using below AWS CLI (v2) command to update the log format of my lambda function , but it's throwing an error as unknown options. As per the documentation, the parameters look correct. Not sure what I'm missing here.

Command aws lambda update-function-configuration --function-name lambda-test --logging-config LogFormat=JSON

Error Unknown options: --logging-config, LogFormat=JSON

已提問 4 個月前檢視次數 202 次
1 個回答
0
已接受的答案

Hello.

Is it possible that the AWS CLI version is outdated?
Please update the AWS CLI version to the latest version and then try running the command.
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

The "--logging-config" option was added in AWS CLI version 2.13.37, so if you are using a version lower than 2.13.37 you will need to upgrade.
https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst

  • api-change:lambda: Adds support for logging configuration in Lambda Functions. Customers will have more control how their function logs are captured and to which cloud watch log group they are delivered also.
profile picture
專家
已回答 4 個月前
profile picture
專家
已審閱 4 個月前
profile picture
專家
已審閱 4 個月前
profile pictureAWS
專家
已審閱 4 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南