Skip to content

Blog: Seamless Migrations via CloudWatch

Cloud Bridge
Cloud Bridge

 

Migrating block-level storage from on-premises environments to the cloud brings numerous benefits, including scalability, cost-efficiency, and enhanced data security. However, a successful migration requires meticulous planning, execution, and continuous monitoring.


This article will explore the significance of monitoring VPN connections when replicating data from on-premises to AWS via CloudWatch. By effectively monitoring these connections, organisations can ensure a timely and well-executed migration process, minimising potential disruptions and maximising the advantages of cloud adoption.


Importance of Monitoring VPN Connections: Site-to-Site Virtual Private Network (VPN) connections play a pivotal role in securely transferring data from on-premises systems to the AWS cloud on the chance that Direct Connect is out of the question and securing traffic over the Internet is crucial. Monitoring these connections is vital for several reasons:


Connectivity Assurance: Continuous monitoring of VPN connections helps ensure the availability and stability of the network. By closely monitoring VPN performance metrics, organisations can proactively identify and resolve potential connectivity issues before they escalate into larger problems, preventing data transfer interruptions and minimising downtime.


Scenario:
We had a client for whom we set up a Site-to-Site VPN as part of migration activities. They used it to create an On-Premises to AWS cluster of Databases. Monitoring the tunnel state is critical in ensuring that the cluster replicates as expected; otherwise, in the event that the VPN connection breaks, the replication configuration has to be started all over again.



Bandwidth Optimisation

Monitoring VPN connections allows organisations to track network bandwidth utilisation during data replication. By analysing network traffic patterns, you can optimise the available bandwidth, identify potential bottlenecks, and make informed decisions to enhance data transfer speeds and efficiency.


Performance Optimisation

Monitoring VPN connections provides valuable insights into network latency, packet loss, and round-trip times. This data helps identify any performance degradation or anomalies, enabling organisations to fine-tune their network configurations and ensure optimal data replication speed and accuracy.


​Security & Compliance​

​VPN connections ensure the secure transmission of data between on-premises environments and AWS. By monitoring these connections, organisations can verify that data is transferred over encrypted channels, minimising the risk of unauthorised access and ensuring compliance with industry regulations and data protection standards.

Scenario:
​CloudFormation enables you to automate the provisioning of AWS resources. Instead of manually setting up resources one by one, you can define them in a CloudFormation template and use it to create a stack. This automation saves time and effort, especially when dealing with complex infrastructures.



Leveraging CloudWatch for Monitoring

AWS CloudWatch is a powerful monitoring and observability service that provides up to near real-time insights into your AWS resources. When replicating data from on-premises to AWS, CloudWatch offers essential monitoring capabilities: 
VPN Connection Monitoring: CloudWatch provides detailed metrics on VPN connections, such as the number of tunnels, connection status, and data transfer rates. By creating custom dashboards and setting up alarms based on these metrics, you can proactively monitor VPN connections and receive notifications if any issues arise.


Log Analysis and Troubleshooting

CloudWatch Logs enable you to centralise and analyse logs from various AWS services, including VPN connections. By configuring log streams and filters, you can gain deeper visibility into VPN-related events and troubleshoot any connectivity or performance issues effectively.


Network Bandwidth Monitoring

CloudWatch allows you to monitor network throughput and data transfer rates, enabling you to optimise bandwidth allocation and identify potential congestion points. With this information, you can make data-driven decisions to enhance the efficiency of your migration process. 
This may be the next most important metric to monitor after TunnelState as this allows AWS administrators to identify how much data is being sent through the Site-to-Site VPN on a timely basis.




To create the bandwidth monitoring of your Site-to-Site VPN connection, follow these steps:​

 

  • First, go to the CloudWatch console.
  • In the navigation pane, choose Metrics. Then, choose All metrics.
  • Under All Metrics, choose VPN. Then, choose VPN tunnel metrics.
  • Select TunnelDataIn and TunnelDataOut metrics for the VPN tunnel that you want to measure.
  • Choose the Graphed metrics tab and set following parameters:
  • Statistics: SUM
  • Period: 5 minutes
  • Choose Add Math. From the dropdown list, choose Start with an empty expression.
  • After you choose Start with an empty expression, a math expression box appears. In this box, enter:
  • (m1+m2)8/300
  • This formula converts bytes to bits, divides by time in seconds to calculate output in bits per second. The variables represent the following values:
  • m1 = TunnelDataIn
  • m2 = TunnelDataOut
  • Choose Apply.


Conclusion

In this post, we have shown a quick rundown on how VPN Bandwidth can be monitored via CloudWatch, a metric not available out of the box. Using CloudWatch’s Math Expression feature, it is possible to extract such data using support metrics, particularly the data transfer rates.
Monitoring VPN connections when replicating data from on-premises to AWS via CloudWatch is crucial for ensuring a successful migration. By closely monitoring VPN connectivity, optimising network bandwidth, and leveraging CloudWatch's monitoring capabilities, organisations can proactively address any issues that may arise during the migration process. This enables a seamless and timely migration of block-level storage to the cloud, unlocking the full potential of AWS and empowering businesses to scale, optimise costs, and enhance data security.



Share: