aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.51k stars 436 forks source link

Cannot connect to my LearnLab account #4587

Closed Aisuko closed 5 months ago

Aisuko commented 7 months ago

Problem

Steps to reproduce the issue

Screenshot 2024-03-26 at 4 21 01 PM

Expected behavior

System details (run the AWS: About Toolkit command)

Name: AWS Toolkit - Amazon Q, CodeWhisperer, and more
Id: amazonwebservices.aws-toolkit-vscode
Description: Including Amazon Q, CodeWhisperer, CodeCatalyst, Application Composer, and support for Lambda, S3, CloudWatch Logs, CloudFormation, and many other services
Version: 2.16.0
Publisher: Amazon Web Services
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.aws-toolkit-vscode
justinmk3 commented 7 months ago

What feature are you trying to use? Amazon Q does not support IAM credentials.

However you can click the "Connect to AWS..." item in "Explorer" to use AWS Explorer for those IAM credentials. If it shows an error, please share the logs (after removing private info).

  1. In VSCode settings, ensure that "aws log level" is "debug".
  2. Perform the steps to reproduce the issue.
  3. Use the AWS: View Toolkit Logs command to get the logs.
  4. Remove any private info from the logs.
Aisuko commented 7 months ago

Hi, there. The explore feature is enough for me. After I configure the ~/.aws/config and ~/.aws/credentials, click the connect to was to get started , and there is nothing change. the log please see below.

The configuration includes region, aws_access_key_id, aws_secret_access_key and aws_session_token which are copied from AWS Academy Learner Lab

2024-03-26 22:10:33 [DEBUG]: command: running "aws.refreshAwsExplorer" with arguments: [
  {
    collapsibleState: 0,
    label: 'Connect to AWS to Get Started...',
    node: {
      resource: '[omitted]',
      id: 'auth',
      onDidChangeTreeItem: [Function (anonymous)]
    },
    command: {
      title: 'Add Connection',
      command: 'aws.auth.manageConnections',
      arguments: '[omitted]'
    },
    tooltip: undefined,
    iconPath: undefined,
    description: undefined,
    contextValue: undefined
  },
  undefined
]
2024-03-26 22:10:33 [DEBUG]: command: running "_aws.auth.autoConnect" with arguments: []
2024-03-26 22:10:33 [DEBUG]: codewhisperer: Connection is valid = false, 
                            connection is undefined = true,
                            secondaryAuth connection expired = false
2024-03-26 22:10:34 [DEBUG]: codewhisperer: Connection is valid = false, 
justinmk3 commented 7 months ago

Can you try cmd+shift+p and run the AWS: Connect to AWS command directly? It should show a menu like this:

image
justinmk3 commented 5 months ago

If LearnLab uses vscode "codeserver" (web) this should be fixed now. https://github.com/aws/aws-toolkit-vscode/pull/5062

Aisuko commented 5 months ago

Thank you.