AWS Lambda
Guia do desenvolvedor

Objeto de contexto do AWS Lambda no Ruby

Quando o Lambda executa sua função, ele transmite um objeto de contexto para o handler. Esse objeto fornece métodos e propriedades que fornecem informações sobre a invocação, a função e o ambiente de execução.

Métodos de contexto

  • get_remaining_time_in_millis – Returns the number of milliseconds left before the execution times out.

Propriedades de contexto

  • function_name – The name of the Lambda function.

  • function_version – The version of the function.

  • invoked_function_arn – The Amazon Resource Name (ARN) used to invoke the function. Indicates if the invoker specified a version number or alias.

  • memory_limit_in_mb – The amount of memory configured on the function.

  • aws_request_id – The identifier of the invocation request.

  • log_group_name – The log group for the function.

  • log_stream_name – The log stream for the function instance.

  • deadline_ms– The date that the execution times out, in Unix time milliseconds.

  • identity – (mobile apps) Information about the Amazon Cognito identity that authorized the request.

  • client_context– (mobile apps) Client context provided to the Lambda invoker by the client application.