Why do I receive a "Failed to authenticate with service" error in AWS Transform MGN or Elastic Disaster Recovery?
I received a "Failed to authenticate with service" error message in AWS Transform MGN or AWS Elastic Disaster Recovery. The error occurred during the initial sync or during the replication process.
Short description
After you start the replication server, the server must reach the following AWS endpoints in your AWS Region:
- AWS Transform MGN endpoint or Elastic Disaster Recovery endpoint.
- Amazon Simple Storage Service (Amazon S3) endpoint
- Amazon Elastic Compute Cloud (Amazon EC2) endpoint
If communication to these endpoints fails, then you receive the "Failed to authenticate with service" error message during initial data replication.
For more information, see Communication between the staging area subnet and AWS Application Migration Service over TCP port 443. Or, see Communication between the staging area subnet and AWS Elastic Disaster Recovery over TCP port 443
Resolution
Identify the endpoint that the server can't communicate with
Complete the following steps:
-
Open the Amazon EC2 console.
-
Choose the latest replication instance that AWS Transform MGN or Elastic Disaster Recovery launched.
Note: Use the AWS Transform MGN replication server or Elastic Disaster Recovery replication server tags to find the replication instance. The instance can be in the Running or Terminated state. If there's no replication server available in your console, then proceed to Test network connectivity.
-
Choose Actions, and then select Monitor and troubleshoot.
-
Choose Get system log.
-
Check the logs for the following errors:
"ERROR: Unable to reach S3"
"ERROR: Unable to reach MGN"
"ERROR: Unable to reach DRS"
Note: Your replication server or staging area subnet also needs TCP 443 connectivity to Amazon EC2 endpoint. However, EC2 endpoint connectivity doesn't have a role in the authentication process of replication servers. You must confirm that the replication server reaches the EC2 API endpoint to call the CreateSnapshots API operation. If you don't run the CreateSnapshots API operation, then data replication stalls in the Finalizing state.
Test DNS and TCP/TLS network connectivity
To test network connectivity to the required service endpoints, create new Amazon EC2 instance, or use an existing EC2 instance. Make sure that the instance uses the same settings as the replication server, such as the same virtual private cloud (VPC), subnet, and security groups.
To test connectivity to the required API endpoints, run the following commands:
curl https://s3.aa-example-1.amazonaws.com -s --connect-timeout 5 --head > /dev/null && echo 'S3 Endpoint reachable' || echo 'ERROR: Unable to reach S3 at https://s3.aa-example-1.amazonaws.com'
Note: Replace aa-example-1 with your Region.
curl https://drs.aa-example-1.amazonaws.com -s --connect-timeout 5 --head > /dev/null && echo 'DRS Endpoint reachable' || echo 'ERROR: Unable to reach DRS at https://drs.aa-example-1.amazonaws.com'
Note: Replace aa-example-1 with your Region.
curl https://mgn.aa-example-1.amazonaws.com -s --connect-timeout 5 --head > /dev/null && echo 'MGN Endpoint reachable' || echo 'ERROR: Unable to reach MGN at https://mgn.aa-example-1.amazonaws.com'
Note: Replace aa-example-1 with your Region.
curl https://ec2.aa-example-1.amazonaws.com -s --connect-timeout 5 --head > /dev/null && echo 'EC2 Endpoint reachable' || echo 'ERROR: Unable to reach EC2 at https://ec2.aa-example-1.amazonaws.com'
Note: Replace aa-example-1 with your Region.
Test SSL/TLS connectivity
Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.
To use openssl to check the SSL/TLS connectivity to the service endpoints, run the following commands from your Linux operating system (OS):
echo -n | openssl s_client -connect drs.aa-example-1.amazonaws.com:443
Note: Replace aa-example-1 with your Region.
-or-
echo -n | openssl s_client -connect mgn.aa-example-1.amazonaws.com:443
Note: Replace aa-example-1 with your Region.
By default, Windows operating system (OS) doesn't include openssl. To use openssl on Windows OS, download OpenSSL binary from Binaries on the GitHub website.
Then, to check the TCP & TLS Connectivity to the service endpoints, run the following commands:
openssl.exe s_client -connect mgn.aa-example-1.amazonaws.com:443
Note: Replace aa-example-1 with your Region.
-or-
openssl.exe s_client -connect drs.aa-example-1.amazonaws.com:443
Note: Replace aa-example-1 with your Region.
To check the SSL/TLS connectivity between the source server and the staging subnet's replication server over the port 1500, run the following commands.
For Linux, run the following command:
echo -n | openssl s_client -connect Server-IP:1500
Note: Replace Server-IP with your replication server IP address. If there's no active replication server, then use the IP address of your test EC2 instance.
For Windows, run the following command:
openssl.exe s_client -connect Server-IP:1500
Note: Replace Server-IP with your replication server IP address. If there's no active replication server, then launch a test instance from the AWS public AMI CE-ssl-speedtest in the same subnet as the replication server using AWS CLI or AWS Cloudshell. Then perform the TLS/SSL connectivity test.
Troubleshoot connection issues
Security group rules and AWS Network Firewall issues
Check that your replication server's security groups, network access control lists (network ACLs), and route table allow outbound access to the endpoints through TCP port 443.
If you use AWS Network Firewall to filter VPC traffic, then you must allowlist the staging subnet CIDR in the Network Firewall rule groups.
VPC interface endpoints issues
Check that you attached the security group to the VPC interface endpoints for Elastic Disaster Recovery, AWS Transform MGN, or Amazon EC2. Make sure that the security group allows inbound TCP port 443 access from your staging area subnet.
If you use VPC interface endpoints between the staging area subnet and AWS API endpoints, then confirm that the VPC endpoint policy allows access to these endpoints. If you don't allow VPC endpoint policy access, then the http_commands_client might not receive commands from the AWS Transform MGN or Elastic Disaster Recovery service.
DNS and Subnet Connectivity issues
For Amazon S3 access in subnets with no internet access, make sure that you use an Amazon S3 gateway endpoint. The replication server can't use an Amazon S3 VPC interface endpoint because Amazon S3 doesn't use your VPC endpoint interface ID.
To resolve this issue, install the Elastic Disaster Recovery agent on a secured network or install the AWS Transform MGN Agent on a secured network.
If the staging area subnet uses an Amazon S3 gateway VPC endpoint for connectivity to Amazon S3, then confirm that the endpoint policy allows access to the AWS owned S3 buckets that host the AWS Transform MGN or Elastic Disaster Recovery replication assets. If the S3 Gateway Endpoint policy doesn't allow access, then the replication server can't download the replication assets, and the Authenticate with service step fails. To resolve this issue, grant policy access to AWS Transform MGN S3 buckets and AWS DRS S3 buckets.
If you use a custom Dynamic Host Configuration Protocol (DHCP) option set for Domain Name System (DNS) resolution in the VPC, then check the DNS servers. The DNS servers must resolve the required endpoints for Amazon EC2, Amazon S3, and AWS Transform MGN or Elastic Disaster Recovery.
IAM permission errors
Review the AWS Identity and Access Management (IAM) policies attached to the following AWS Transform MGN or Elastic Disaster Recovery replication server's instance profile role:
- AWSElasticDisasterRecoveryReplicationServerRole
- AWSApplicationMigrationReplicationServerRole
If you get an access denied error, then add the AWSElasticDisasterRecoveryReplicationServerPolicy and AWSApplicationMigrationReplicationServerPolicy IAM policies to the specific AWS Transform MGN and Elastic Disaster Recovery replication server Instance profile role.
If you attached permission boundary IAM policies to the replication server's IAM role that doesn't allow AWS Transform MGN or Elastic Disaster Recovery API operations, then the replication server can't retrieve commands from the service. Check the AWS CloudTrail logs for Access Denied errors for API operations.
Internet access issues
If you use an internet gateway for internet access, then confirm that the replication server has a public IP address to communicate with the endpoints. To check your configuration, complete the following steps:
- Open the AWS Transform MGN console or the Elastic Disaster Recovery console.
- In the navigation pane, choose Source servers.
- Choose Edit replication settings.
- Under IPv4 address assignment, choose Create public IP.
- Choose Save replication settings.
For more AWS Transform MGN troubleshooting information, see Troubleshooting communication errors.
For more Elastic Disaster Recovery troubleshooting information, see Troubleshooting communication errors.
- Language
- English

Fantastic article! This helped me understand this topic much more easily. Thank you!
replied 4 years ago
This article was reviewed and updated on 2026-10-13.
Relevant content
asked 3 years ago
asked 4 years ago