简体   繁体   中英

Performance issue boto3 kms decrypt method

I'm running function on AWS lambda, using python 3.7.6 I have a timeout of 1 second on my function and I started to get sometime request timeout for my service. After some investigation(Added runtime logs), I found that the boto3 KMS client decrypts method is too slow. The weird thing is that it not consistently. Most of the time the decryption is taking about 0.04 seconds. But once in a while, the decrypt method is taking 0.5 seconds on the same values exactly!

What can cause that performance gap?

I this this answer to a previous question which may be relevant to this issue (which presumably you have now resolved or given up on but others may find useful;-).

The reason I say may is that you mention this sometimes working and other times not which seems inconsistent with what is discussed in the question I mentioned .

Within that same answer there is a link to an AWS feature which came along after the question I have cited above and which may make be easier to make use of than the original answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM