Home > Software design >  LambdaContext object has no attribute getRemainingTimeInMillis
LambdaContext object has no attribute getRemainingTimeInMillis

Time:11-09

Code:

def lambda_handler(event, context):
    print('test')
    print(context.getRemainingTimeInMillis())

Error:

{
  "errorMessage": "'LambdaContext' object has no attribute 'getRemainingTimeInMillis'",
  "errorType": "AttributeError"
}

This is working on other functions with the same python3.9 runtime.

CodePudding user response:

getRemainingTimeInMillis() is for nodejs. For python it should be:

context.get_remaining_time_in_millis()
  • Related