3 ways to test S3 in Python
|Countdown link||Open timer|
At some point, every engineer has to decide whether to write tests or ship the feature and move on. Testing code that uses S3 is often overlooked. But think of all the important things your application uses S3 for! Metadata storage, logs, and static file hosting, to name a few.
Testing code that uses S3 is really easy. This talk goes over three ways to test S3 and leaves you with code examples that you can take to your next project.
- Benefits of testing code that uses S3
In-depth code examples of three ways to test S3:
Mock out the S3 API responses using botocore stubs
- Mock the S3 API using moto
- Spin up a LocalStack S3 instance and test against that
I’m an Engineering Manager at Alpha Health. I love building software that helps patients have a better experience with healthcare.
I have a B.S. in Computer Science and M.S. in Biomedical Informatics from Stanford University. Outside of software, I enjoy sports, meditation, and reading.