When calling the Amazon API Gateway, the client needs to support Server Name Indication. Here’s how to get it working through Apache JMeter. I am using JMeter version 2.13.

The Issue

Let’s assume you’ve set up your thread groups, and now you’re sorting out your HTTP Request sampler.

Your sampler configuration may look something a bit like this:

HTTP Request sampler configuration for hitting a Amazon Gateway API through JMeter
HTTP Request sampler configuration for hitting a Amazon Gateway API through JMeter

However, when you try and hit the API, you may get an SSLHandshakeException stack trace from JMeter that looks something like this:

The Fix

This issue is caused by the HttpClient4 implementation. Change your http client implementation to be HttpClient3.1 and try again:

Result after changing the HttpClient implementation version from 4.0 to 3.1
Result after changing the HttpClient implementation version from 4.0 to 3.1