Amazon S3 Test
Country Manager, India
AI, Manufacturing, DevOps, and Managed Services. 17+ years across Manufacturing, E-commerce, Retail, NBFC & Banking
Inject failure in our functions
- AWS Serverless Hero Yan Cui has written several articles about latency injection for AWS Lambda, see “How can we apply the principles of chaos engineering to AWS Lambda?” (https://theburningmonk.com/2017/10/how-can-we-apply-the-principles-of-chaos-engineering-to-aws-lambda/) and “Applying principles of chaos engineering to AWS Lambda with latency injection” (https://hackernoon.com/chaos-engineering-and-aws-lambda-latency-injection-ddeb4ff8d983) from October 2017. These articles explain why we could and should use chaos engineering in our serverless applications as well as showing examples on how to do it.
- AWS Principal Developer Advocate Architecture Adrian Hornsby expanded on this by first creating a Lambda layer and later a Python library for failure injection, chaos_lambda (https://github.com/adhorn/aws-lambda-chaos-injection), giving developers an easier way to get started with chaos experiments for AWS Lambda. Just install the library, wrap your functions with the appropriate failure mode and you are ready to start injecting failure!
- To reach the same level of simplicity for NodeJS developers I late last year created an NPM package called failure-lambda (https://github.com/gunnargrosch/failure-lambda). The goal with failure-lambda is in short to have an easy way to do failure injection in AWS Lambda using several different failure modes. To make it even easier I decided to use a single wrapper and instead have the failure mode selectable. That way you don’t have to make code changes if you want to switch between for example latency or exception injection, you just change a setting.
- As we know serverless isn’t just about AWS and chaos engineering for serverless isn’t only about AWS Lambda. For that reason, there are now also the same failure injection options for NodeJS developers building serverless using Azure Functions and Cloud Functions. This with the NPM packages failure-azurefunctions (https://github.com/gunnargrosch/failure-azurefunctions) and failure-cloudfunctions (https://github.com/gunnargrosch/failure-cloudfunctions).
RECENT BLOG
RECENT BLOG
Mastering IaC Management: Essential Best Practices for Your Infrastructure
test content place it here
Master Cloud IaC Management for Seamless Infrastructure Deployment
test content place it here
Mastering DevOps IaC Management for Efficient Infrastructure
test content place it here
Streamline Infrastructure with IaC Management Software Solutions
test content place it here
Mastering Infrastructure as Code: Your Essential iac management services Overview
test content place it here
IaC Management Pricing India: Optimize Your Cloud Costs Now
test content place it here
Find Top IaC Management Companies in India for Cloud Optimization
test content place it here
Master IaC Management in India: Your Complete Guide
test content place it here
Mastering IaC Management 2026: Essential Strategies for IT Success
test content place it here
Unlock Efficiency with Expert iac Management Consulting Strategies
test content place it here
Expert Terraform IaC Management for India: Boost Efficiency Today.
test content place it here
Master IaC Management: Your Essential Guide Explained
test content place it here
Failure modes and rate of failure
Even though this all started with latency injection as in Yan Cui’s articles, latency is far from the only possible failure we can have in our serverless applications. In failure-lambda, failure-azurefunctions and failure-cloudfunctions there are now five different failure modes to choose from:
Identify Weaknesses
Injects latency to the executed function, controlled using a minimum and maximum span of milliseconds. This can for example be used to simulate service latency or to test and help set your timeout values.
Exception
Throws an exception in the function. Helps you test how your application and code handles exceptions.
Status code
Your function will return a status code of choice, for instance 502 or 404 instead of the normal 200. This gives you the possibility to test what happens when there are errors.
Disk space
Will fill your temporary disk with files to create a failure. If you’re using disk to store temporary files you can test how your application behaves if that disk gets full or you are unable to store to it.
Blacklist (courtesy of Jason Barto)
Blocks connections to specified hosts. Use to simulate services or third parties being unavailable.
All these failure modes can be used together with a rate of failure that you set. The default is to inject failure on every invocation but in reality, it is likely that for example a third party is unavailable on 50% of the calls made to that host or that an exception is thrown on a quarter of the invocations. Setting rate will allow you to achieve this.
POPULAR BLOG
AWS
Choose the Best AWS Consultancy Bangalore
AWS
Optimizing Oracle on AWS Licensing Compliance and Cost
AWS
AWS vs Oracle Cloud Simplified by Opsio
AWS
Implementing Managed Backup and Disaster Recovery: A Strategic Guide for Business Resilience
AWS
Automated Visual Inspection: Transforming Quality Control in Manufacturing
AWS
Surface Inspection Techniques Quality Control
AWS
Top Technologies in Bottle Inspection Systems
AWS
Effective Methods for Detecting Packaging Damage
AWS
Automating PCB Inspection Using Computer Vision
AWS
Amazon S3 Storage Guide India
AWS
AWS Security
AWS
AWS Prices
Unsure About Your Cloud Strategy? Let Us Guide You
Receive personalized guidance from our cloud professionals. Talk to an expert or schedule a meeting with our consultant today.
Talk To Our Cloud ExpertsOUR SERVICES
These services represent just a glimpse of the diverse range of solutions we provide to our clients
Cloud Consulting
Cloud Migration
Cloud Optimisation
Managed Cloud
Cloud Operations
Enterprise
Application
Security as a
Service
Disaster Recovery
Experience the power of cutting - edge technology, streamlined efficiency scalability, and rapid deployment with Cloud Platforms!
Need expert help with amazon s3 test?
Our cloud architects can help you with amazon s3 test — from strategy to implementation. Book a free 30-minute advisory call with no obligation.
Get in touch
Tell us about your business requirement and let us take care of the rest.
Follow us on
Start Your Cloud Journey With Opsio
And Let Us Take Care Of The Rest
Enquire NowAbout the Author

Country Manager, India at Opsio
AI, Manufacturing, DevOps, and Managed Services. 17+ years across Manufacturing, E-commerce, Retail, NBFC & Banking
Editorial standards: This article was written by a certified practitioner and peer-reviewed by our engineering team. We update content quarterly to ensure technical accuracy. Opsio maintains editorial independence — we recommend solutions based on technical merit, not commercial relationships.