How to send gatling request with AWS Signature Version 4.


I am trying to automate a scenario where I need to generate load on Pods which are hosted on AWS. They require authentication with “AWS Signature Version 4”.
I am not sure how to send a request with “AWS Signature Version 4” via Gatling Tried to google it but found nothing.
AWS Signature Version 4 takes these values.

1.) AccessKey
2.) SecretKey
3.) AWS Region
4.) Service Name

“Authorization”: "AWS4-HMAC-SHA256 Credential=AccessKey/us-east-1/apigateway/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date, Signature=“somevalue”,

Does giving all the values like this will help?

.header(“Content-Type”, “application/x-www-form-urlencoded”)
.formParam(“AccessKey”, “${AccessKey}”)

.formParam(“SecretKey”, “${SecretKey}”)

.formParam(“AWS Region”, “”)
.formParam(“Service Name”, “”)


I found a github project on scala for aws sign 4:
So adding the dependency in pom.xml is not helping in import the classes.

Tried another way I created Authorization signature in java and sending the request like this and I am able to get the response. Now need to figure out how to create Authorization in scala.

.header(“Content-Type”, “application/x-www-form-urlencoded”)
.header(“Content-Type”, “application/json”)
.header(“X-Amz-Date”, “”)
.header(“Authorization”, “”)
.header(“Cache-Control”, “no-cache”)
“orders”: [