All-in-one serverless DevOps platform.
Full-stack visibility across the entire stack.
Detect and resolve incidents in record time.
Conform to industry best practices.
When using services created by other people, it’s often neither obvious what they mean, let alone how to fix them. One of these error messages you might see when using Amazon API Gateway is “encoding not enabled”.
The first question here is, what kind of encoding does this error message refer to? The first thought might go into the video or audio encoding direction and lead to a dead-end since you probably didn’t send any audio or video files. The error message is confusing because it aims to compress your response payload.
Content-encoding will be disabled by default when you create a new API. So it’s very likely that you already have one or multiple APIs running that don’t use this feature.
Depending on your API responses’ size, disabled content-encoding can lead to needlessly high traffic. And outbound traffic from AWS can get expensive quickly.
If you’re using the API Gateway console, you can simply enable content-encoding in your API settings.
Be aware that there are two “Settings” menu-items. First, you need to select your API, and then you select the settings of that API and not the general settings of the API Gateway service at the bottom.
Below, you can see the highlighted “Settings” menu-item for a gateway called “Endpoint.”
If you’re using the AWS CLI, the following command will update your API.
$ aws apigateway update-rest-api \
–rest-api-id <YOUR_API_ID> \
Replace <YOUR_API_ID> with the ID of the API you want to enable content-encoding for. If you choose a higher value than 0 for compression, all responses below that value won’t be compressed.
With CloudFormation, you have to set the MinimumCompressionSize property of your AWS::ApiGateway::RestApi resource.
In most cases, content-encoding doesn’t pose any problems. Compression algorithms are optimized these days, and almost all HTTP clients can work with compressed response payloads.
One reason to keep it disabled is performance. Compressing your responses doesn’t come for free. Minimal responses or binary responses often don’t compress very well, so you’re better off sending them uncompressed and save latency by removing a compression step.
Another reason is debugging. If you need to scan some network frames with a tool like WireShark for some reason, disabling content-encoding would give you more insights.
The final reason is the support of legacy browsers. If you work in a slow-moving company, the chances are that you have some ancient versions of the Internet Explorer floating around. This can lead to problems with compressed responses, especially when their content is an already zipped file.
Content-encoding is about the compression of your API responses, and you should consider enabling it to save money on outgoing AWS traffic.
If you have specific needs, like sending hard to compress binaries or only minimal response payloads, you can opt-out to squeeze out the last few milliseconds of latency.
You can also check if the content-encoding feature is enabled for API Gateway stages to compress API payloads with Dashbird. The Well-Architected Insights feature will give you a quick and easy understanding of how your current settings are impacting your whole system, what exactly is affected, and what to do about it:
Debugging with Dashbird: Malformed Lambda Proxy Response
Building complex Well-Architected Infrastructures
AWS Well-Architected Framework in Serverless: Security Pillar
Today we are excited to announce scheduled searches – a new feature on Dashbird that allows you to track any log event across your stack, turn it into time-series metric and also configure alert notifications based on it.
One of the most vital aspects to monitor is the metrics. You should know how your cluster performs and if it can keep up with the traffic. Learn more about monitoring Amazon OpenSearch Service.
Dashbird recently added support for ELB, so now you can keep track of your load balancers in one central place. It comes with all the information you expect from AWS monitoring services and more!
Dashbird was born out of our own need for an enhanced serverless debugging and monitoring tool, and we take pride in being developers.
Dashbird gives us a simple and easy to use tool to have peace of mind and know that all of our Serverless functions are running correctly. We are instantly aware now if there’s a problem. We love the fact that we have enough information in the Slack notification itself to take appropriate action immediately and know exactly where the issue occurred.
Thanks to Dashbird the time to discover the occurrence of an issue reduced from 2-4 hours to a matter of seconds or minutes. It also means that hundreds of dollars are saved every month.
Great onboarding: it takes just a couple of minutes to connect an AWS account to an organization in Dashbird. The UI is clean and gives a good overview of what is happening with the Lambdas and API Gateways in the account.
I mean, it is just extremely time-saving. It’s so efficient! I don’t think it’s an exaggeration or dramatic to say that Dashbird has been a lifesaver for us.
Dashbird provides an easier interface to monitor and debug problems with our Lambdas. Relevant logs are simple to find and view. Dashbird’s support has been good, and they take product suggestions with grace.
Great UI. Easy to navigate through CloudWatch logs. Simple setup.
Dashbird helped us refine the size of our Lambdas, resulting in significantly reduced costs. We have Dashbird alert us in seconds via email when any of our functions behaves abnormally. Their app immediately makes the cause and severity of errors obvious.
End-to-end observability and real-time error tracking for AWS applications.