Static Analysis for AWS Best Practices in Python Code
Rajdeep Mukherjee, Omer Tripp, Ben Liblit, Michael Wilson

TL;DR
This paper develops static analysis rules to detect deviations from AWS best practices in Python code using Boto3, addressing challenges in type inference and demonstrating high accuracy and developer acceptance.
Contribution
It introduces a layered type inference strategy for Python AWS SDKs and presents eight best-practice rules validated on real-world GitHub repositories.
Findings
Achieves 85% precision and 100% recall in inferring Boto3 clients.
Developed eight AWS best-practice rules covering pagination, polling, and batch operations.
Over 83% developer acceptance of recommendations.
Abstract
Amazon Web Services (AWS) is a comprehensive and broadly adopted cloud provider, offering over 200 fully featured services, including compute, database, storage, networking and content delivery, machine learning, Internet of Things and many others. AWS SDKs provide access to AWS services through API endpoints. However, incorrect use of these APIs can lead to code defects, crashes, performance issues, and other problems. This paper presents automated static analysis rules, developed in the context of a commercial service for detection of code defects and security vulnerabilities, to identify deviations from AWS best practices in Python applications that use the AWS SDK. Such applications use the AWS SDK for Python, called "Boto3", to access AWS cloud services. However, precise static analysis of Python applications that use cloud SDKs requires robust type inference for inferring the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
