aws / aws/aws-toolkit-visual-studio
No such host is known when choosing an enabled region
- Dominant language
- No language data
- Stars
- 135
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
**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**

**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.d__15.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.d__5.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.d__162.MoveNext()
--- End of inner exception stack trace ---
at Amazon.AWSToolkit.Publish.ViewModels.PublishToAwsDocumentViewModel.d__162.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.d__160.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__28.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:**
- Windows Version: Windows 10 Pro
- Visual Studio Version: 17.9.2
- AWS Toolkit for Visual Studio Version: 1.49.0.0
**Additional context**
Contributor guide
Research direction
Start with PublishToAwsDocumentViewModel.StartDeploymentSessionAsync, DeployToolController.StartSessionAsync, and RestAPIClient.StartDeploymentSessionAsync, following the logged request for elasticbeanstalk.me-central-1.amazonaws.com. Reproduce the Publish to AWS flow with an IAM user and the Middle East (UAE) region, then verify that deployment sessions start successfully for custom-enabled regions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100