1 Answer
- Newest
- Most votes
- Most comments
0
Hello numeracle_brett,
To troubleshoot further and dive deeper in regards to seeing 160 ms latency, we require details that are non-public information to troubleshoot. Could you please open a support case with AWS using the following link
In the support case could you please provide the following information below?
- KMS key ID
- Lambda ARN
- Is this behavior occurring in specific region or in all regions?
- Lambda code
- Lambda CloudWatch logs
Relevant content
- asked 10 months ago
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
How are you measuring the latency? It's possible that you overlooked something during measurement, or delay is coming from other part of the API call. I suggest using AWS X-Ray to trace the Lambda function call. https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html
I have print statements tightly around the signing operation and looking at timestamps. I also removed the signing operation and watched the overall script speed increase drastically. I'm pretty sure I'm measuring it right.
I did switch to envelope encryption to bring my keys closer to the script and used libraries to perform my signing. This has brought my latency from about 250ms total to 25ms total. Wish I could use Amazon KMS tho, not sure why it's so slow.