awslabs / service-workbench-on-aws

A platform that provides researchers with one-click access to collaborative workspace environments operating across teams, universities, and datasets while enabling university IT stakeholders to manage, monitor, and control spending, apply security best practices, and comply with corporate governance.
Apache License 2.0
178 stars 119 forks source link

[Bug] Issues when creating workspace in HongKong region #887

Open dengmingtong opened 2 years ago

dengmingtong commented 2 years ago

Describe the bug Currently, I have deployed SWB successfully in Hongkong region based on hongkong-fix branch.

I found some issues during using swb workbench in Hongkong region. I have fixed some of them and sent pull request : https://github.com/awslabs/service-workbench-on-aws/pull/886

And there are still some error as below:

1, Stop "EC2 Linux-v1" workspace failed and send SSH public Key failed.

2, Create "EMR-v1" workspace failed. The CloudFormation stack show error as below: ElasticMapReduce Cluster with Id j-1J30PBZ67SBXL, is in state TERMINATING and failed to stabilize due to the following reason: {Code: BOOTSTRAP_FAILURE,Message: Master instance (i-0529cfead1240df83) failed attempting to download bootstrap action 3 file from S3}

3, Create "EC2 Windows-v1" workspace failed. The CloudFormation stack show error as below: Failed to receive 1 resource signal(s) within the specified duration

Thanks, Mingtong

Bingjiling commented 2 years ago

Hi @dengmingtong,

Thanks for providing all the details. We'll be looking into it.

Thanks, Yanyu

nguyen102 commented 2 years ago
  1. Send SSH public key failed because ec2-instance-connect is not supported in Hong Kong. link.

Stopping the instance failed because of this error

  code: 'AuthFailure',
  time: 2022-02-01T18:32:31.833Z,
  requestId: '88797ef5-880e-40fe-accf-a0fd4f2e4b0e',
  statusCode: 401,
  retryable: false,
  retryDelay: 976.889493020314,
  msg: 'AWS was not able to validate the provided access credentials',
  stack: 'AuthFailure: AWS was not able to validate the provided access credentials\n' +
    '    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/services/ec2.js:50:35)\n' +
    '    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)\n' +
    '    at Request.emit (/var/runtime/nod'
}

You can find the error in the Step Function's lambda cloudwatch logs. It looks like it's probably cause by this reason.

Try editing the code here to be const sts = new aws.sdk.STS({ apiVersion: '2011-06-15', stsRegionalEndpoints: 'regional' });

  1. The bootstrap actions are defined here. You can start your debugging here. After updating the template, be sure to redeploy your code. You will see a new workspace type, EMR-v2. Import that.
dengmingtong commented 2 years ago

Hello, Thanks for your response, I will test it later according to your suggestion.

You did not mention about windows workspace type, could you help to check why windows workspace type do not work in HongKong region?