Cannot create hosting connection for AWS "Failed to connect the AWS EC2 endpoint URL"

Cannot create hosting connection for AWS "Failed to connect the AWS EC2 endpoint URL"

book

Article ID: CTX692871

calendar_today

Updated On:

Description

On entering  API key and Secret key with Role Based Authentrication for AWS   get the following error:

Transaction ID:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

Action Name: Hosting_EditHypervisorConnection

Exception: StudioErrorId : ConnectionValidationFailure Reason : ManagedMachineGeneralException Exception : PluginUtilities.Exceptions.ManagedMachineGeneralException: Failed to connect the AWS EC2 endpoint URL=https://ec2.us-east-1.amazonaws.com/ ---> PluginUtilities.Exceptions.WrappedPluginException: Unable to get IAM security credentials from EC2 Instance Metadata Service. Message : Failed to connect the AWS EC2 endpoint URL=https://ec2.us-east-1.amazonaws.com/ Error Source : CitrixHostService Sdk Error Message : The connection could not be created as not all details could be validated. The actual failure was noted with message 'Failed to connect the AWS EC2 endpoint d

Resolution

The error message means that the Cloud Connector permissions are not set in AWS or else there is a network issue between the Connector and AWS.

Each Cloud Connector Instance in AWS must have correct permissions .

If there is more than 1 Cloud Connector all must be checked.

See https://docs.citrix.com/en-us/citrix-daas/install-configure/connections/connection-aws.html#minimal-iam-permissions-policy

 

 

 

This commmand can be run on the Cloud Connector's  AWS command line to verify connectivity and permissions.

aws sts get-caller-identity shows as an example when working correctly 
{
    "UserId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Account": "8133333333",
    "Arn": "arn:aws:sts::81xxxxxxx:assumed-role/VDA-VirtualDesktopApplication-ap05041-GlobalInstanceRole-000/i-0d4f34ca0009f9b86" 

All Cloud Connectors s in the Resource Location must be checked .

 

In this case 1 Cloud Connector had an error.

 

If this Cloud Connector was shutdown the host connection could be created

After further verification the cloud connector in question  had been mistakenly set with an incorrect default gateway

After resolving this the probem was resolved.


Problem Cause

Network issue