- Newest
- Most votes
- Most comments
You'll need separate private subnets and public subnets in your VPC. Place a NAT gateway in the public subnet in each availability zone (AZ), or just one AZ if high availability is not a consideration. In the VPC route table of each of the private subnets, point the IPv4 default route 0.0.0.0/0 to the NAT gateway in the same AZ.
For the public subnets, you can use a single VPC route table. Point its default route 0.0.0.0/0 to the internet gateway (IGW) attached to the VPC.
There's a nice diagram of this standard design in this documentation article: https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-scenarios.html#public-nat-internet-access
This way, when Amazon Managed Grafana tries to connect to the internet, the private IP addresses of the elastic network interfaces (ENIs) that it has placed in your VPC's subnets will be translated to the public, internet-routable elastic IPs (EIPs) of the NAT gateways. That will work.
If you only point the default route of a subnet containing Grafana's ENIs towards the IGW, the traffic will attempt to get routed to the internet with private source IP addresses, and that won't work. That's probably the problem you're seeing.
You can disregard the other suggestions in the bot's reply. It doesn't understand that you already confirmed that permissions are correctly configured and API calls correctly made when you tested that everything related to CloudWatch Logs is working when not connected to the VPC.
Yes, it is possible to configure Amazon Managed Grafana to access CloudWatch logs from another region while still being inside a VPC. However, there are a few important considerations and steps you need to take:
-
VPC Endpoint for CloudWatch Logs: To access CloudWatch Logs from within your VPC, you need to create an interface VPC endpoint for CloudWatch Logs. This allows private communication between your VPC and CloudWatch Logs without requiring an internet gateway, NAT instance, or VPN connection. You'll need to create this endpoint for each region you want to access CloudWatch Logs from.
-
NAT Gateway Requirement: When using cross-account observability for CloudWatch data sources, Amazon Managed Grafana relies on CloudWatch Observability Access Manager, which does not support VPC endpoints. If your Grafana workspace is running within a VPC, you must have a NAT Gateway that allows the workspace to call APIs on the internet.
-
IAM Permissions: Ensure that the IAM role associated with your Grafana instance has the necessary permissions to access CloudWatch Logs across regions. You may need to add specific actions to allow reading across accounts if you're using cross-account observability.
-
Cross-Region Access: In the CloudWatch data source configuration within Grafana, you can specify the region you want to query. Make sure you have the correct region selected when querying logs from sa-east-1.
-
Network Configuration: Verify that your VPC's network configuration, including route tables and security groups, allows outbound traffic to the CloudWatch Logs endpoints in the desired regions.
By implementing these configurations, you should be able to access CloudWatch logs from sa-east-1 while your Grafana instance remains associated with the VPC in us-east-1, maintaining access to both your RDS and the CloudWatch logs from different regions.
Sources
Using CloudWatch Logs with interface VPC endpoints - Amazon CloudWatch Logs
Using the query editor - Amazon Managed Grafana
Connect to an Amazon CloudWatch data source - Amazon Managed Grafana
Cross-account observability - Amazon Managed Grafana
Relevant content
- asked 3 years ago
- asked 3 years ago

Hey I forgot to reply to this. Worked perfectly. Thaks a lot Leo!