Slow DoS attack mitigation — a Consegna approach.

Recently we discovered that a customer’s website was being attacked in what is best described as a “slow DoS”. The attacker was running a script that scraped each page of the site to find possible PDF files to download, then was initiating many downloads of each file.

Because the site was fronted by a Content Delivery Network (CDN), the site itself was fine and experienced no increase in load or service disruption, but it did cause a large spike in bandwidth usage between the CDN and the clients. The increase in bandwidth was significant enough to increase the monthly charge from around NZ$1,500 to over NZ$5,000. Every time the customer banned the IP address that was sending all the requests, a new IP would appear to replace it. It seems the point of the attack was to waste bandwidth and cost our customer money — and it was succeeding.

The site itself was hosted in AWS on an EC2 instance, however the CDN service the site was using was a third party — Fastly. After some investigation, it seemed that Fastly didn’t have any automated mitigation features that would stop this attack. Knowing that AWS Web Application Firewall (WAF) has built in rate-based rules we decided to investigate whether we could migrate the CDN to CloudFront and make use of these rules.

All we needed to do was create a CloudFront distribution with the same behaviour as the Fastly one, then point the DNS records to CloudFront — easy right? Fastly has a neat feature that allows you to redirect at the edge which was being used to redirect the apex domain to the www subdomain — if we were to replicate this behaviour in CloudFront we would need some extra help, but first we needed to make sure we could make the required DNS changes.

To point a domain at CloudFront that is managed by Route 53 is easy, you can just set an ALIAS record on the apex domain and a CNAME on the www subdomain. However, this customers DNS was managed by a third-party provider who they were committed to sticking with (this is a blog post for another day). The third-party provider did not support ALIAS or ANAME records and insisted that apex domains could only have A records — that meant we could only use IP addresses!

Because CloudFront has so many edge locations (108 at the time of writing), it wasn’t practical to get a list of all of them and set 108 A records — plus this would require activating the “static IP” feature of CloudFront which gives you a dedicated IP for each edge location, which costs around NZ$1,000 a month.

And to top all that off, whatever solution we decided to use would only be in place for 2 months as the site was being migrated to a fully managed service. We needed a solution that would be quick and easy to implement — AWS to the rescue!

So, we had three choices:

  1. Stay with Fastly and figure out how to ban the bad actors
  2. Move to CloudFront and figure out the redirect (bearing in mind we only had A records to work with)
  3. Do nothing and incur the NZ$5,000 cost each month — high risk if the move to a managed service ended up being delayed. We decided this wasn’t really an option.

We considered spinning up a reverse proxy and pointing the apex domain at it to redirect to the www subdomain (remember, we couldn’t use an S3 bucket because we could only set A records) but decided against this approach because we’d need to make the reverse proxy scalable given we’d be introducing it in front of the CDN during an ongoing DoS attack. Even though the current attack was slow, it could have easily been changed into something more serious.

We decided to stay with Fastly and figure out how to automatically ban IP addresses that were doing too many requests. Aside from the DNS limitation, one of the main drivers for this decision was inspecting the current rate of the DoS — it was so slow that it was below the minimum rate-based rule configuration that the AWS WAF allows (2,000 requests in 5 minutes). We needed to write our own rate-based rules anyway, so using CloudFront and WAF didn’t solve our problems straight away.

Thankfully, Fastly had an API that we could hit with a list of bad IPs — so all we needed to figure out was:

  1. Get access to the Fastly logs,
  2. Parse the logs and count the number of requests,
  3. Auto-ban the bad IPs.

Because Fastly allows log shipping to S3 buckets, we configured it to ship to our AWS account in a log format that could be easily consumed by Athena, and wrote a couple of AWS Lambda functions that:

  1. Queried the Fastly logs S3 bucket using Athena,
  2. Inspected the logs and banned bad actors by hitting the Fastly API, maintaining state in DynamoDB,
  3. Built a report of bad IPs and ISPs and generated a complaint email.

The deployed solution looked something like this:

By leveraging S3, Athena, Lambda and DynamoDB we were able to deploy a fully serverless rate-based auto-banner for bad actors with a very short turnaround. The customer was happy with this solution as it avoided having to incur the $5000 NZD / month cost, avoided needing to change the existing brittle DNS setup and also provided some valuable exposure into how powerful serverless technology on AWS is.

It’s implementing solutions like this that helps set Consegna apart from other cloud consultancies — we are a true technology partner and care deeply about getting outcomes for customers that align with their business goals, not just looking after our bottom line.

Busy-ness And Innovation. How Hackathons Can Successfully Promote New Ideas And Thinking

At Consegna we pride ourselves on our experience and knowledge.  Our recently appointed National Client Manager has a knack for knowing virtually everybody in Wellington. This can be amusing if you’re with him as a 10 minute walk down Lambton Quay can take half an hour. We tend to now leave gaps that long between meetings. One of the questions he will ask people is one we probably all ask, “how’s business?”  The answer is always the same, “busy!”


Now sometimes that can just be a standard answer, but if it’s true and we’re all so busy then what are we busy doing? We would like to think we’re doing super innovative work but how much time do we actually dedicate to innovation? Most of the time we’re busy just trying to complete projects. Google famously scraped their “20% time” dedicated to innovation because managers were judged on the productivity of their teams and they were in turn concerned about falling behind on projects where only 80% capacity was used. Yet, the flipside of that was that  “20% time” formed the genesis of Gmail, Adsense and Google Talk.


So this leads on to thinking how can we continue to create when we’re all so busy? We have to be innovative about being innovative.  One solution that organisations have been working on is the idea of a hackathon. A short period of time, usually around 48 hours, for organisations to stop what they’re doing and work on exciting new things that traditionally might be out of scope or “nice to haves”.


Consegna was selected as the University of Auckland cloud enablement partner in 2017 and were recently involved with the University’s cloud centre of excellence team who wanted to promote and facilitate innovation within their internal teams. One answer to create more innovation was hosting a Hackathon with Auckland University internal teams. In total there were 17 teams of 2-6 people a team. They were tasked with trying to solve operational issues within the University – and there were a number of reasons we jumped at the chance to help them with their hackathon.


First and foremost we liked the idea of two days being used to build, break and create. We were there as the AWS experts to help get the boat moving, but deep down we’re all engineers and developers who like to roll up our sleeves and get on the tools.


Secondly, after watching larger companies like Facebook define why they use Hackathons, it resonated with the team at Consegna. “Prototypes don’t need to be polished, they just need to work at the beginning”. Facebook Chat came out of a 2007 Hackathon which evolved into Web Chat, then Mobile Chat which then became Facebook Messenger as we know it today. The end result of a hackathon doesn’t need to be be pretty, but the potential could know no bounds. Consegna were able to help Auckland University build something where its success was not judged on immediate outcomes, but on the potential outcomes to do amazing things.


Hackathons can also be incredibly motivating for staff members. For those of you who are familiar with Daniel Pink’s book “Drive”, you’ll know money doesn’t always motive staff like we traditionally thought it did. Autonomy, Mastery and Purpose are key parts of Pink’s thinking but also the key to a successful hackathon. The business is not telling you how to do something and in a lot of cases, the guidelines can be very fluid in that they’re not telling you what to build. A guiding question to a successful hackathon can be succinctly put as “what do you think?”


We applaud Auckland University for inviting us along to allow their staff members to pick our brains and learn new things. Want to know how to program Alexa? No problem! How can I collect, process and analyse streaming data in real time? Talk to one our lead DevOps Architects, they’ll introduce you to Kinesis. There was as much learning and teaching going on at the hackathon as there was building some amazing applications.


It’s important to be aware of potential pitfalls of hosting a hackathon and to be mindful you don’t fall for the traps. You want to make sure you get the most out of your hackathon, everybody enjoys it and that there are plenty of takeaways otherwise bluntly, what’s the point?


Hackathons as a general rule don’t allow for access to customers. If you’re wanting to dedicate just 48 hours to solve a problem then how can you have understanding and empathy for customers if they’re not around? If they’re not there to collect feedback and iterate can you even build it? Auckland University got around that problem by largely building for themselves; they were the customer. They could interview each other for feedback so this was a tidy solution so if you think a hackathon will offer a solution for customer-facing applications you might want to think about either making customers available for further enhancements outside of the hackathon or think of a different innovation solution altogether.


Before I mentioned how Facebook use hackathons to inspire innovation, but there is one downside – they’re unpaid and on weekends. Employees can feel obligated to participate to please hierarchies which forces innovation out of their staff. Generally, this is not going to go well. The driving factors Pink mentions are not going to be as prevalent if staff are doing it in their own time, usually without pay – to build something the business owns. From what I’ve seen Facebook put on some amazing food for their hackathons but so what? Value your staff, value the work they do and don’t force them to do it on their own time. Auckland University’s hackathon was scheduled over two working days, in work time and made sure staff felt valued for what ultimately was a tool for the University.


Over the two days, the 18 teams presented their projects and there were some amazing outcomes. MiA, the winner, used a QR code on a big screen so students can snapshot the QR code and register their attendance to each lecture. This was done with an eye on Rekognition being the next iteration and using image recognition software to measure attendance. Generally speaking, there’s not a whole lot wrong with how the University currently measures attendance with good old fashioned pen and paper but how accurate is it when you’re allowing humans to be involved and how cool is it for an AWS product to take the whole problem away?


In all, it was an amazing event to be a part of and we must thank Auckland University for inviting us. Also thanks to AWS for providing a wealth of credits so there was no cost barrier to building and creating.


If you’re thinking of hosting your own hackathon I wish you well. It’s a great way to take a break from being busy and focus on creating new tools with potentially unlimited potential. It will get your staff scratching a learning and creative itch they’ve been aching to get at.


Most importantly, always take time and make strategies to keep innovating. Don’t be too busy.

Why Cloud is Relevant to Your Business Today

As the newly appointed ICT Manager for a large government agency, Jeff was keen to make his mark quickly and decisively in his new role. Looking at the IT spend over the last three years, he could see that in spite of the market shifting considerably, the agency had been paying exorbitant amounts for application hosting. The market had trended downwards with pressure from large Cloud providers like AWS. Looking at their hosting arrangements more closely, Jeff could not only see their costs remained largely unchanged but also, service reliability had been steadily declining. This project looked like an ideal candidate to reduce cost, increase service levels, and make the mark he wanted.

After looking at the current environment carefully, a current rebuild of the primary public website for the agency appeared to be a good choice. The site was currently in development using AWS services. The development team had chosen AWS for development due to its low cost, well within their budget. Far more compelling to them was the speed with which the developers could provision and utilise the necessary resources. What would typically take internal IT weeks to provide for the developers could be accomplished inside a day using AWS management tools and company best practice.
Using managed services such as AWS Elastic Beanstalk, not only did the development team have ready access to a low-cost development environment they could provision on demand. They could also run parallel application stacks for testing. That just wasn’t possible using their existing infrastructure that was difficult to access and manage. As such, the AWS services allowed new configurations to be tested quickly at a fraction of the cost of traditional infrastructure. Cents per hour, versus a few hundred dollars a month.

With the application completed, launch day and migration commenced. Fortunately, Jeff had identified that the team needed an AWS partner to assist with the migration. This lead to the realisation that a scalable architecture was required to support the fluctuating demand on the website. With the right design, the right AWS partner, the site was migrated and delivered a 75% saving on the former hosting costs. With the automated scaling and monitoring, AWS services provided as part of the production environment, site outages dropped to less than 1% over first few months of operation, improving even more over time. The site had gone from 2 – 3 outages per month on the old hosting, due to network and other issues, to no unscheduled outages from one month to the next.

At this point, one would think this would be the end of the story. The primary production site was on AWS at a fraction of the former cost. Service levels were higher than they ever had been. The new problem that was beginning to emerge was cost control and environmental regulation.

With the success of this project, Jeff’s teams started moving more and more projects to AWS. As more teams in the organisation also adopted this approach, keeping an eye on resource usage started becoming more challenging. Managing what teams and individuals had access to resources was also emerging as a challenge. The situation Jeff was finding himself in after an initial easy win is quite common. Many companies who discovered server virtualisation during the mid-2000’s also learned technology on its own can create all new challenges nobody had previously anticipated.

The simple answer to why Cloud is relevant to your business today is the agility it provides and the transfer of CapEx to OpEx. Not to mention the tangible cost savings you can make. What’s important for ICT managers to understand, however, is the importance of a structured approach to Cloud Adoption. Not every workload is going to be a suitable candidate for migration. Ongoing success requires the implementation of a Cloud Adoption Framework (CAF) and the establishment of a Cloud Centre of Excellence (CCoE). Neither of which need to be as daunting as they sound. The CAF examines your current environment and assesses what workloads would work in the Cloud. It highlights six perspectives around Business, People, Governance, Platform, Security, and Operations. In so doing, it ensures thought is given to each of these within the context of Cloud. What training do your people need for example, when a particular application gets migrated to the Cloud? How would their roles change? What operational support would they need?

A CCoE should be seen as the thought leadership and delivery enablement team that will help plan and execute on the CAF. It usually consists of SMEs from each principal area the CAF examines. By choosing an AWS Consulting Partner like Consegna, who understand this pragmatic, structured approach to cloud adoption and digital transformation, ongoing long-term success starts from a solid foundation.

The discoveries Jeff made during his journey to Cloud are being made by ICT managers on a near-daily basis. An increasing number of Jeff’s peers understand that Cloud is a timely and necessary step to reduce cost and increase agile productivity. Those with that extra slice of understanding and knowledge are working with partners like Consegna to do Digital Transformation the smart way. Putting CAF and CCoE at the forefront of their journey, and seeing great successes in doing so.

Why is CAF Critical to Cloud Adoption?

An all too familiar scenario playing out in numerous organisations today is a rapid push onto the Cloud.  Typically this entails a technical division getting approval to migrate a workload onto to the Cloud, or establish a new project on AWS EC2 instances.

Fast forward a few months and the organisation’s cloud adoption seems to be progressing fairly well.  More and more teams and applications are running on AWS, but it’s around this time that cost and management have started spiralling out of control.  A quick survey of the organisation’s AWS account reveals there are users, instances and various other resources running out of control “on the cloud”.  The typical issues many organisations have wrestled with in their traditional infrastructure space has been directly translated onto the Cloud.  Now the financial controller and other executives are starting to question the whole Cloud strategy.  What exactly has gone wrong here?

Whether you’re prototyping a small proof of concept (POC) or looking to migrate your entire organisation into the Cloud, if you fail to adhere to a Cloud Adoption Framework (CAF) and form a Cloud Centre of Excellence (CCoE), it won’t be a case of if the wheels fall off the wagon, but when.

Think of the CAF as a structured roadmap that outlines how and when you’re going to migrate onto the Cloud, and the CCoE as the project leadership team who will be able to execute the CAF in a manner that will guarantee results.

The CAF looks at Cloud Adoption from six different perspectives. Business, People, Governance, Platform, Security and Operations.


It ensures that no matter what project you have in mind, the broader implications of Cloud adoption are highlighted and worked through.  If you’ve ever been privy to the disaster an ad-hoc technology lead adoption results in, you’ll truly appreciate how critical CAF is to successful Cloud transformation.

Consegna specialise in running CAF workshops for organisations to ensure success with end to end Cloud transformation, both from a Business and Technical perspective, for complete Cloud adoption.  For a coffee and chat about CAF and how it can ensure the success of your Cloud migration and digital transformation, contact for a catch up.

How Do You Assess A Trusted Cloud Partner?

When it comes to digital transformation and cloud adoption, a trusted advisor with the right experience is a crucial component to your success.  How do you evaluate your options?

Case studies such as the one recently published by Consegna.Cloud, highlight the challenges and solutions provided, giving key decision makers essential insights into the scope and scale of other projects in relation to their own.


Case Study


Key points of interest in the case study are identifying the complexity of the project.  For example, in the QV case study Consegna recently published, the existing systems were almost twenty years old, so a mature system with a lot of legacy components.  Thus, a high level of complexity.

Case studies also highlight the key benefits the project delivered.  In the case of QV, over 50% savings on Infrastructure costs alone.  Please look for these key metrics as you read through the case study.

Such artefacts are useful in establishing the evidence based capabilities that Consegna, a trusted Cloud advisor, possess.  Feel free to contact the Consegna team to ascertain how your project compares to the QV project.  Simply email  to start the conversation.

CIO Covers Consegna Launch

The official Consegna launch at The Seafarers Building in Britomart was recently reported in CIO from IDG.


The article covers some other movers and shakers in the industry along with some photos from the evening.

Great coverage always appreciated by the Consegna team.

Consegna Official Launch

Last Thursday evening Consegna were proud to host clients and business partners to their official launch at Seafarers in Auckland.


The evening was a great success with Tim Dacombe-Bird, Country Manager of AWS speaking, along with customer presentations from Liz Cawson of AMP and Duncan Reed from QV, both highlighting the working partnerships they have with Consegna and AWS.

Thank you to AWS, Megaport & Symantec for their support on the night. More photos on