Exact-match causes and verified fixes for the errors developers hit migrating off deprecated AWS runtimes and Amazon Linux 2. Every fix cites a primary source. Not sure which apply to you? Scan your project free — it runs entirely in your browser.
Runtime.ImportModuleError: Error: Cannot find module — AWS LambdaThe runtime parameter of nodejs18.x is no longer supported for creating or updating AWS Lambda functions — AWS LambdaThe runtime parameter of python3.9 is no longer supported for creating or updating AWS Lambda functions — AWS LambdaError: Cannot find module 'aws-sdk' — AWS Lambda (Node.js 18+)/lib64/libc.so.6: version `GLIBC_2.28' not found — AWS Lambda (native dependency)/usr/bin/env: 'python2': No such file or directory — Amazon Linux 2023Error: Unable to find a match: <package> — Amazon Linux 2023Failed to start ntpd.service: Unit ntpd.service not found. — Amazon Linux 2023amazon-linux-extras: command not found — Amazon Linux 2023Error: error:0308010C:digital envelope routines::unsupported — Node.js 18+ (OpenSSL 3)Error: The module was compiled against a different Node.js version using NODE_MODULE_VERSION — Node.js 22Node Sass does not yet support your current environment — Node.js 22TypeError: crypto.createCipher is not a function — Node.js 22[DEP0040] DeprecationWarning: The `punycode` module is deprecated — Node.js 22AttributeError: module 'collections' has no attribute 'Mapping' — Python 3.10+AttributeError: module 'asyncio' has no attribute 'coroutine' — Python 3.11DeprecationWarning: datetime.datetime.utcnow() is deprecated — Python 3.12ModuleNotFoundError: No module named 'distutils' — Python 3.12ModuleNotFoundError: No module named 'imp' — Python 3.12ModuleNotFoundError: No module named 'cgi' — Python 3.13ModuleNotFoundError: No module named 'crypt' — Python 3.13ModuleNotFoundError: No module named 'lib2to3' — Python 3.13ModuleNotFoundError: No module named 'telnetlib' — Python 3.13