| ▲ | anentropic an hour ago | |
if imports are slow one should probably look into pre-compiling .pyc files into the Lambda bundle | ||
| ▲ | coredog64 17 minutes ago | parent [-] | |
This is a well known issue, and the fix is not to create any boto3 clients at runtime. Instead, ensure they're created globally (even if you throw them away) as the work then gets done once during the init period. The init period gets additional CPU allocation, so this is essentially "free" CPU. Source: I'm a former AWS employee. | ||