Comment on page
Connect Akto with AWS Traffic Mirroring
Learn how to send API traffic data using AWS traffic mirroring to Akto from your environment.
Traffic Mirroring is an Amazon VPC feature that you can use to copy network traffic from an elastic network interface of type
Traffic mirroring is our recommended way to receive data as it is completely non-intrusive. Akto's traffic analyzer analyzes this traffic to create your application's APIs request and response, understand API metadata and find misconfigurations. Akto can work with high traffic scale though you can always configure the amount of traffic you want to send to Akto dashboard.
- 1.You should have installed Akto dashboard in the same VPC as your application server EC2 instances
- 2.You have permissions to create and assign roles to InstanceProfiles
- 3.Your application should be receiving unencrypted traffic. SSL, if any, should be terminated before it reaches your application server EC2 instance. Usually, SSL termination happens at API Gateway or Load balancer.
To start capturing traffic from your staging, production ( or any other environment), you will need to sign-in to your dashboard and follow the steps below.
- 1.Navigate to the
Quick Startpage on dashboard.
Click on Quickstart
connect traffic data.
Click on connect traffic data
Below steps create a policy with AWS permissions in your account that allows Akto to capture API traffic from your selected loadbalancers.
- 1.Grab the policy JSON from your Akto dashboard in the first step as shown in the screenshot.
Clickon the link mentioned in
Click on AWS policy link
2. This will take you to the policy page of AWS. Navigate to
Policy page of AWS
Copy the policyfrom dashboard and
Copy policy JSON
Click on review policy.
Paste in AWS
5. Name the policy
create policy. Once policy is created, go back to the dashboard.
Policy created in AWS
You have now given Akto the permissions to read loadbalancer names from your AWS account.
- 1.Refresh the dashboard now.
- 2.You will be able to see a list of all the
Select loadbalancersunder my connections section. Select only those loadbalancers from which you want to mirror the traffic to Akto dashboard.
Select Loadbalancer in Akto
Applyto start traffic mirroring.
Waitfor a couple of minutes. Mirroring is being setup on the loadbalancers you selected above.
Wait for a few mins
6. Once mirroring is complete, head to the
API inventory pageand see all the APIs Akto has discovered.
The mirrored traffic will contain a lot of sensitive data - does it leave my VPC?
Mirrored data remains strictly within your VPC. You can verify it by looking at VPC > Traffic mirror Targets. The NLB there & its listeners are all within your VPC. Akto doesn't take data out of your VPC at all.
Does Traffic mirroring have any impact on performance, latency or network bandwidth?
AWS Traffic mirroring is guaranteed to have 0 impact on performance and latency. It will definitely double your instance bandwidth usage. In case of bandwidth congestion, AWS will always prioritize your production traffic. You can read more about it here from AWS documentation.
My traffic volume is of the order of TBs/hour. How much will traffic mirroring cost me?
Do I have to install an agent or any service on my application server?
No. AWS Traffic mirroring is a completely non-intrusive way to collect and analyze server-side traffic. Absolutely no need to install or change any of your network settings at all.
I already have traffic mirroring setup on my application servers. Can I still use traffic mirroring?
AWS can't send same mirrored traffic to 2 diff targets. You should delete the existing session or use a diff traffic connector.
I can't see my Load balancer in the AWS Traffic mirroring section on Akto dashboard
Most likely, it is not in the same VPC as Akto dashboard. Please ensure your Akto dashboard is setup in the same VPC as your application server.
When I hit apply, it says "Something went wrong". How can I fix it?
Akto runs a Cloudformation template behind the scenes to setup the data processing stack and traffic mirroring sessions with your application servers' EC2 instances. This error means the Cloudformation setup failed.
- 1.Go to AWS > Cloudformation > Search for "mirroring"
- 2.Click on Akto-mirroring stack and go to Events tab
- 3.Scroll down to the oldest error event.
The Cloudformation template failed with "Client.InternalError: Client error on launch.". How should I fix it?
The Cloudformation template failed with "We currently do not have sufficient capacity in the Availability Zone you requested... Launching EC2 instance failed."
You can reinstall Akto in a diff availability zone or you can go to Template tab and save the cloudformation template in a file. Search for "InstanceType" and replace all the occurrences with a type that is available in your availability zone. You can then go to AWS > Cloudformation > Create stack and use this new template to setup Traffic mirroring.
I don't see my error on this list here.
There are multiple ways to request support from Akto. We are 24X7 available on the following: