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

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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ