How a hospitality marketplace blocked over 99% of malicious traffic with AWS WAF
A hospitality marketplace in Abuja that holds booking payments in escrow put AWS WAF, Amazon Cognito and AWS KMS in front of its platform. Over 99% of malicious traffic is now blocked at the edge, and escrow reconciliation errors fell 80%.
The problem.
Our client is a hospitality marketplace in Abuja. People book through its platform, and it holds their payments in escrow until each booking is fulfilled.
About 5,000 malicious requests a day reached the company's application directly, measured from its load balancer logs. Most were bots and card-testing attempts, where attackers try stolen card numbers to see which ones work. The service had no protection in front of it.
The servers had also been set up by hand over time. Parts of their configuration were not written down, including where some credentials were kept. Escrow reconciliation errors took about 15 hours of manual correction every month.
For a business that holds customer money, this was serious. Card testing leads to chargebacks and disputes, and the company depends on its payment partners trusting it.
What we built.
AWS WAF at the edge
Traffic now passes through AWS WAF before it reaches the application. We set up AWS managed rules for common attacks and SQL injection, and added our own rate limits for each client address to stop card testing and bots. We chose WAF in front of the load balancer because the attacks were at the application level, which is exactly where WAF rules apply. Traffic is encrypted with certificates from AWS Certificate Manager.
Managed sign-in with Amazon Cognito
Users sign up and sign in through Amazon Cognito, which also controls what each user can access. We chose Cognito over custom sign-in code because a managed identity service is safer to run and easier to keep up to date.
Escrow data under its own key
Escrow documents are stored in Amazon S3 and encrypted with their own key in AWS Key Management Service (KMS). The key rotates automatically, and only the application's role is allowed to use it. We chose a dedicated key over the default encryption key so that use of escrow data can be restricted to one role and every use is recorded. The storage bucket and the database only accept encrypted connections.
Credentials found and moved
Before moving anything, we compared what was really running on the old servers with the new design, and found where credentials lived. All of them now sit in AWS Secrets Manager under a rotation process, so no production credential is written into code or configuration.
Private servers, defined as code
The application runs on Amazon EC2 instances in private subnets that nobody reaches by SSH. Engineers use AWS Systems Manager instead. Amazon CloudWatch alarms send security and health alerts to the team. Everything is defined in AWS CloudFormation and changed through reviewed code. We trained the company's developers on Cognito, encryption and secrets management, and set up the process they now use to rotate secrets.
AWS services in this engagement
The results.
Attacks stopped at the edge. AWS WAF blocks over 99% of malicious traffic before it reaches the application, down from about 5,000 malicious requests a day getting through. The baseline came from load balancer logs and the result from WAF logs.
Fewer escrow errors. Reconciliation errors fell 80% from a baseline of about 15 hours of manual correction a month, measured from the finance team's monthly report.
No hardcoded production credentials: every production credential is managed in Secrets Manager. Escrow data is protected by its own key, encrypted at rest with KMS.
What we learned: the biggest risk was what nobody had written down. Because the old servers were configured by hand, we had to discover their settings, including credentials, before we could safely move the escrow flows. We now start every rebuild of hand-managed infrastructure with a configuration and credential inventory, and plan time for it, instead of finding these settings halfway through.
Tell us what you're trying to ship.
A 30-minute scoping call with the engineers who would do the work.