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

asked 4 months ago193 views
1 Answer
0
Accepted Answer

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
EXPERT
answered 4 months ago
profile picture
EXPERT
reviewed 4 months ago
profile picture
EXPERT
reviewed 4 months ago
profile pictureAWS
EXPERT
reviewed 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions