A Serverless Perspective on AWS SNS
Graviton2, the ARM-based processor built by AWS is making its foray into Lambda land. Starting today, we will be able to select “arm64” as a configuration option while launching Lambda functions. It is expected to be priced cheaper compared to the current x86 offering. Graviton2 will be available in the following regions at launch:
- Asia Pacific (Mumbai)
- Asia Pacific (Singapore)
- Asia Pacific (Sydney)
- Asia Pacific (Tokyo)
- EU (Frankfurt)
- EU (Ireland)
- EU (London)
- US East (N. Virginia)
- US East (Ohio)
- US West (Oregon)
Current limitations of Lambda functions will apply to Graviton2 Lambda functions as well. Account-level limits will count to x86 & arm64 together.
Runtime Support
Following are the runtimes that will be supported at launch:
- Python 3.8, 3.9
- Node 12 & 14
- Java 8.al2, 11
- Ruby 2.7
- .Net Core 3.1
- Custom Runtime (provided.al2)
- OCI Base Images
Test Run
We took Graviton2 lambda functions for a spin and tested them against x86 lambda functions. Lambda function is a simple one that generates UUIDs and inserts them into DynamoDB. We used Lambda Power Tuning open-source project to test the Lambda in different configurations and compare it with the x86 lambda function.
Note that the above image doesn’t represent cost accurately as Lambda Power Tuner is not updated with cost information of Graviton2 at the time of writing.
Memory (MB) | x86 | arm64 |
128 | 187ms | 188ms |
256 | 66ms | 57ms |
512 | 59ms | 60ms |
1024 | 59ms | 61ms |
1536 | 67ms | 58ms |
3008 | 64ms | 55ms |
While the performance of the Lambda function may vary based on the workload, it seemed very close to x86 in our findings. We strongly recommend using Lambda Power Tuner to do performance benchmarking to find the best configuration for your workload. Overall, we think that Graviton2 could potentially lower the Lambda cost for many workloads & improve the price to a performance by up to 34%.