Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Lambda: Accuracy of system clock

Tags:

aws-lambda

What is the guaranteed maximum system clock error observed in AWS Lambda functions?

More specifically, across Lambda instances in the same AWS Region (not AZ), what is the maximum difference of system clock times that could be observed?

I can't find anything in AWS documentation about this.

like image 271
typpo Avatar asked Jan 11 '18 21:01

typpo


People also ask

Is AWS Lambda real time?

You'll use AWS Lambda to process real-time streams, Amazon DynamoDB to persist records in a NoSQL database, Amazon Kinesis Data Analytics to aggregate data, Amazon Kinesis Data Firehose to archive the raw data to Amazon S3, and Amazon Athena to run ad-hoc queries against the raw data.

What happens if Lambda it runs for more than 15 minute?

When the specified timeout is reached, Amazon Lambda terminates execution of your Lambda function. As a best practice, you should set the timeout value based on your expected execution time to prevent your function from running longer than intended.

How does AWS sync clocks?

Amazon Time Sync is used by EC2 instances and other AWS services. It uses a fleet of redundant satellite-connected and atomic clocks in each Region to deliver time derived from these highly accurate reference clocks. This service is provided at no additional charge.


1 Answers

AWS Lambda clocks are synchronized using NTP, so the accuracy is as good as what NTP can provide

Quoting from what I found in the Lambda documentation here

TZ – The environment's time zone (UTC). The execution environment uses NTP to synchronize the system clock

  • https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
  • https://docs.aws.amazon.com/lambda/latest/dg/lambda-dg.pdf
like image 71
rustedGeek Avatar answered Jan 02 '23 05:01

rustedGeek