aws / aws-toolkit-visual-studio

AWS Toolkit for Visual Studio - a plugin to interact with AWS
https://aws.amazon.com/visualstudio/
Apache License 2.0
107 stars 29 forks source link

No such host is known when choosing an enabled region #404

Open MohdNofal opened 6 months ago

MohdNofal commented 6 months ago

Describe the bug If you open the "Publish to AWS" page and choose an AWS IAM user and a custom-enabled region (in my case it is Middle East (UAE), you will get the following error:

Unable to start a deployment session: {"ErrorCode":"UnexpectedError","Message":"No such host is known. (elasticbeanstalk.me-central-1.amazonaws.com:443)","ProcessExitCode":null}

To Reproduce

  1. Enable "Middle East (UAE)" region for your AWS account
  2. Create an IAM user, and use the IAM user as an authentication to aws-toolkit-visual-studio
  3. Open the "Publish to AWS" to publish a .NET website
  4. You will get the error Unable to start a deployment session: {"ErrorCode":"UnexpectedError","Message":"No such host is known. (elasticbeanstalk.me-central-1.amazonaws.com:443)","ProcessExitCode":null}
  5. If you try to change the region to something that is enabled by default by AWS, then the "Publish to AWS" page will work

Expected behavior Be able to publish to AWS on custom-enabled regions

Screenshots image

Toolkit Logs

2024-03-12 14:18:45,028 [230] DEBUG Amazon.AWSToolkit.Telemetry.Internal.TelemetryPublisher - Publishing 10 event(s) 2024-03-12 14:18:47,755 [1] DEBUG Amazon.AWSToolkit.Publish.Views.PublishToAwsDocumentControl - Disposing Publish dialog: 2024-03-12 14:18:47,755 [1] DEBUG Amazon.AWSToolkit.Publish.Views.PublishToAwsDocumentControl - Disposed Publish dialog: 2024-03-12 14:18:55,965 [160] DEBUG Amazon.AWSToolkit.Publish.ViewModels.PublishToAwsDocumentViewModel - Starting a deployment session 2024-03-12 14:20:02,989 [193] ERROR Amazon.AWSToolkit.Publish.Views.PublishToAwsDocumentControl - Error refreshing publish state Amazon.AWSToolkit.Publish.SessionException: Unable to start a deployment session: {"ErrorCode":"UnexpectedError","Message":"No such host is known. (elasticbeanstalk.me-central-1.amazonaws.com:443)","ProcessExitCode":null} ---> AWS.Deploy.ServerMode.Client.ApiException: The HTTP status code of the response was not expected (500). Status: 500 Response: {"ErrorCode":"UnexpectedError","Message":"No such host is known. (elasticbeanstalk.me-central-1.amazonaws.com:443)","ProcessExitCode":null} at AWS.Deploy.ServerMode.Client.RestAPIClient.d15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.AWSToolkit.Publish.ViewModels.DeployToolController.d5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.AWSToolkit.Publish.ViewModels.PublishToAwsDocumentViewModel.d162.MoveNext() --- End of inner exception stack trace --- at Amazon.AWSToolkit.Publish.ViewModels.PublishToAwsDocumentViewModel.d162.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.AWSToolkit.Publish.ViewModels.PublishToAwsDocumentViewModel.d160.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.AWSToolkit.Publish.Views.PublishToAwsDocumentControl.d28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Amazon.AWSToolkit.Publish.Views.PublishToAwsDocumentControl.d__27.MoveNext()

Development System:

Additional context

awschristou commented 6 months ago

Thank you for reporting this bug. There is already an open issue upstream in the deploy tool that supports the Publish to AWS experience. I have added this scenario to that issue. https://github.com/aws/aws-dotnet-deploy/issues/467

We'll leave this issue open to track progress in the Publish to AWS experience.