0
votes

Using latest VSCode and the plugin version.

AWS Toolkit is working fine.

kubectl get pods works fine from terminal.

Kubernetes extension showing the cluster name, BUT while trying to open Nodes or other things getting this error:

Unable to parse config file: /Users/yurib/.aws/config Unable to parse config file: /Users/yurib/.aws/config Unable to parse config file: /Users/yurib/.aws/config Unable to parse config file: /Users/yurib/.aws/config Unable to parse config file: /Users/yurib/.aws/config Unable to connect to the server: getting credentials: exec: executable aws failed with exit code 255

No logs, nothing...

enter image description here enter image description here

config:

[okta]
# Okta Dev APP
#####################
aws_saml_url = home/amazon_aws/0oadubzz5cWgsZdON1t7/272


# Dev is the HUB account
#########################
[profile dev]
# Role to assume - each team will use it’s own role
role_arn = arn:aws:iam::703608045793:role/okta-admin-role
region = us-east-1
# source_profile = dev
session_ttl = 12h


#Spoke Accounts
###################

[profile development]
# Role to assume - each team will use it’s own role
role_arn = arn:aws:iam::703608045793:role/okta-admin-role
region = us-east-1
source_profile = dev
session_ttl = 12h

#Staging
##########

[profile staging]
source_profile = dev
role_arn = arn:aws:iam::238368749987:role/aws-okta-admin-role
region = us-east-1
assume_role_ttl = 1h

#GAS
##########

[profile gas]
source_profile = dev
role_arn = arn:aws:iam::759967409705:role/aws-okta-admin-role
region = us-east-1
assume_role_ttl = 1h


#CRISPR
###########

[profile crispr]
source_profile = dev
role_arn = arn:aws:iam::636792403073:role/aws-okta-admin-role
region = eu-west-1
assume_role_ttl = 1h

credentials:

[dev]
aws_access_key_id     = XXXXXXXXX
aws_secret_access_key = XXXXXX
aws_session_token     = XXXXXXXXX
aws_security_token    = XXXXXXXXX

[gas]
aws_access_key_id     = XXXXXXXXX
aws_secret_access_key = XXXXXXXXX
aws_session_token     = XXXXXXXXX
aws_security_token    = XXXXXXXXX

[crispr]
aws_access_key_id     = XXXXXXXXX
aws_secret_access_key = XXXXXXXXX
aws_session_token     = XXXXXXXXX
aws_security_token    = XXXXXXXXX

The cluster is on CRISPR account.

kubeconfig is ok.

2

2 Answers

0
votes

I rearranged the config file and it works now.

Working aws config:

[okta]
aws_saml_url = home/amazon_aws/yyYYhshdYndmd/313

[profile dev]
source_profile = dev
role_arn = arn:aws:iam::xxxxxxxxxxxx:role/okta-admin-role
region = us-east-1
session_ttl = 12h


[profile crispr]
source_profile = dev
role_arn = arn:aws:iam::xxxxxxxxxxxx:role/aws-okta-admin-role
region = eu-west-1
assume_role_ttl = 1h


[profile staging]
source_profile = dev
role_arn = arn:aws:iam::xxxxxxxxxxxx:role/aws-okta-admin-role
region = us-east-1
assume_role_ttl = 1h


[profile rndlab]
source_profile = dev
role_arn = arn:aws:iam::xxxxxxxxxxxx:role/aws-okta-admin-role
region = us-east-1
assume_role_ttl = 1h
0
votes

according to the docs

should config looks like that:

[default]
aws_access_key_id = xxxxxxxxxxxxxxx
aws_secret_access_key = yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

I had found previously broken config on my Mac:

# Amazon Web Services Config File used by AWS CLI, SDKs, and tools
# This file was created by the AWS Toolkit for JetBrains plugin.
#
# Your AWS credentials are represented by access keys associated with IAM users.
# For information about how to create and manage AWS access keys for a user, see:
# https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
#
# This config file can store multiple access keys by placing each one in a
# named "profile". For information about how to change the access keys in a
# profile or to add a new profile with a different access key, see:
# https://docs.aws.amazon.com/cli/latest/userguide/cli-config-files.html
#
# If both a credential and config file exists, the values in the credential file
# take precedence

[default]
# The access key and secret key pair identify your account and grant access to AWS.
aws_access_key_id = [accessKey]
# Treat your secret key like a password. Never share your secret key with anyone. Do
# not post it in online forums, or store it in a source control system. If your secret
# key is ever disclosed, immediately use IAM to delete the access key and secret key
# and create a new key pair. Then, update this file with the replacement key details.
aws_secret_access_key = [secretKey]

# [profile user1]
aws_access_key_id = xxxxxxxxxxxxxxx
aws_secret_access_key = yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy