Bootstrap FreeKB - Amazon Web Services (AWS) - Update Lambda Function Configuration using the AWS CLI
Amazon Web Services (AWS) - Update Lambda Function Configuration using the AWS CLI

Updated:   |  Amazon Web Services (AWS) articles

This assumes you have already configured the aws command line tool. If not, check out my article on Getting Started with the AWS CLI.

The aws lambda list-functions command can be used to list the Lambda Functions you have created.

aws lambda list-functions

 

Something like this should be returned.

{
    "Functions": [
        {
            "TracingConfig": {
                "Mode": "PassThrough"
            },
            "Version": "$LATEST",
            "CodeSha256": "/ur2jHd199ldQbP+Y20sw3kIHhaWwnPY6CQvSwZ6Kco=",
            "FunctionName": "myfunction",
            "MemorySize": 128,
            "RevisionId": "741c094a-cff2-4cdb-a5b6-110a900e1a43",
            "CodeSize": 529507,
            "FunctionArn": "arn:aws:lambda:us-east-1:123456789012:function:myfunction",
            "Handler": "app.lambda_handler",
            "Role": "arn:aws:iam::123456789012:role/myfunction",
            "Timeout": 3,
            "LastModified": "2023-11-16T02:52:04.978+0000",
            "Runtime": "python3.9",
            "Description": ""
        }
    ]
}

 

You can:

  • use the aws lambda update-function-configuration command to update your Lambda Function configuration (this article)
  • use the aws lambda update-function-code commadn to update your Lambda Function code

In this example, the aws lambda update-function-configuration command can be used to increase the timeout from 3 seconds to 6 seconds.

aws lambda update-function-configuration --function-name myfunction --timeout 6

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter f5ff4c in the box below so that we can be sure you are a human.