- Newest
- Most votes
- Most comments
Hello.
Is your AppRunner connected to a custom VPC?
If you are connected to a VPC, you will not be able to connect to the Internet from AppRunner unless you set up a NAT Gateway.
If you are using AppRunner connected to a VPC, you will need to use a NAT Gateway to connect to the Godaddy smtp server.
https://docs.aws.amazon.com/apprunner/latest/dg/network-vpc.html#network-vpc.subnet
When you connect your service to a VPC, the outbound traffic doesn't have access to the public internet. All outbound traffic from your application is directed through the VPC that your service is connected to. All networking rules for the VPC apply to the outbound traffic of your application. This means that your services can't access the public internet and AWS APIs. To gain access, do one of the following:
- Connect the subnets to the internet through a NAT Gateway.
- Set up VPC endpoints for the AWS services that you want to access. Your service stays within the Amazon VPC by using AWS PrivateLink.
Some Availability Zones in some AWS Regions don't support the subnets that can be used with App Runner services. If you choose subnets in these Availability Zones, your service fails to be created or updated. For these situations, App Runner provides a detailed error message pointing to the unsupported subnets and Availability Zones. When this occurs, troubleshoot by removing the unsupported subnets from your request, and then try again.
The issue you're experiencing is likely related to network connectivity restrictions in AWS AppRunner rather than AWS interfering with your GoDaddy email setup. AppRunner, by default, may not have direct access to external SMTP servers like smtp.office365.com.
To resolve this, you have a few options:
-
Configure VPC connectivity for your AppRunner service. This allows you to set up a NAT Gateway in a public subnet, which can then route traffic from your AppRunner service to external services like your SMTP server.
-
Use Amazon Simple Email Service (SES) instead of your GoDaddy SMTP server. This would require setting up SES, including verifying your domain and potentially moving out of the SES sandbox if you need to send to non-verified email addresses.
-
If you decide to stick with your GoDaddy SMTP server, you'll need to ensure that your AppRunner service has a route to the internet, which typically involves VPC configuration with a NAT Gateway.
It's important to note that AWS isn't specifically blocking your GoDaddy emails. The issue is more about the network configuration of AppRunner services. When running locally, your application has direct internet access, which is why it works from your machine.
If you choose to use Amazon SES, you would need to verify your domain and potentially request production access to send emails to non-verified addresses. This process involves submitting a request to AWS to increase your sending limits and remove sandbox restrictions.
Regardless of which option you choose, you'll need to update your application's configuration to use the appropriate email sending method once deployed on AppRunner.
Sources
How to send email from AWS AppRunner using Amazon SES? | AWS re:Post
Using Simple Email Service via SMTP | AWS re:Post
The app runner is connected to vpc which has internet gateway and has internet access. Still its not able to connect to godaddy smtp server?
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 9 months ago

Thanks for replying @Riku. But my apprunner service is connected to default vpc, which has internet gateway, so should have internet access?
Are you configuring the VPC Connector described in the following document to connect to the VPC? If you are configuring the following documents, a NAT Gateway is required in your VPC. https://docs.aws.amazon.com/apprunner/latest/dg/network-vpc.html
If you are in the default state and have not configured the VPC connector, you should be able to connect to the Internet without any configuration.
Yes, i am configuring as per above document. But my subnets are public and vpc has internet gateway. The document does mention "If you choose a public subnet, errors will occur when running your App Runner service" but I am not getting any errors and app is working fine. Seems "The VPC connectors in App Runner are based on AWS Hyperplane" is causing this.. not sure if this traffic can be routed through existing internet gateway instead of configuring NAT and incurring additional costs. Anyway, thanks for your reply @Riku.!! Maybe I will just switch to SES.
If outbound communication from AppRunner goes through a VPC, it will not be able to connect to the public Internet even if it is linked to a public subnet. As stated in the document shared in the comment above, you need to link AppRunner to a subnet with a route to a NAT Gateway configured. I think the explanation in the following AWS blog is easy to understand. https://aws.amazon.com/jp/blogs/containers/deep-dive-on-aws-app-runner-vpc-networking/