handsome-businessperson-23021
10/08/2023, 4:46 PMkubernetes-aws-go
project and immediately stuck with the credentials error ๐
We use AWS SSO, and so only $AWS_PROFILE gets exported. I have .aws/config
but not .aws/credentials
This all works perfectly in Python, but fails in Go. I found a few (Closed) bugs in Github, and many people allegedly reported that recent upgrades solved the issue for them.
But not for me.
See details in ๐งต:$ aws configure list
Name Value Type Location
---- ----- ---- --------
profile awsa env ['AWS_PROFILE', 'AWS_DEFAULT_PROFILE']
access_key ****************3TRE sso
secret_key ****************OLSI sso
region us-east-1 config-file ~/.aws/config
$ pulumi config
KEY VALUE
aws:profile awsa
aws:region ca-central-1
aws:skipCredentialsValidation true
aws:skipMetadataApiCheck true
desiredClusterSize 3
eksNodeInstanceType t3.medium
minClusterSize 4
vpcNetworkCidr 10.0.0.0/16
$ pulumi up
Enter your passphrase to unlock config/secrets
(set PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE to remember):
Enter your passphrase to unlock config/secrets
Previewing update (dev):
Type Name Plan Info
+ pulumi:pulumi:Stack eks-cluster-go-dev create 2 errors; 2 warnings; 7 messages
+ โโ awsx:ec2:Vpc eks-vpc create
Diagnostics:
pulumi:pulumi:Stack (eks-cluster-go-dev):
warning: using pulumi-language-go from $PATH at /opt/homebrew/bin/pulumi-language-go
warning: using pulumi-language-go from $PATH at /opt/homebrew/bin/pulumi-language-go
error: an unhandled error occurred: program failed:
waiting for RPCs: rpc error: code = Unknown desc = invocation of aws:index/getAvailabilityZones:getAvailabilityZones returned an error: unable to discover AWS AccessKeyID and/or SecretAccessKey - see <https://pulumi.io/install/aws.html> for details on configuration
error: Error: invocation of aws:index/getAvailabilityZones:getAvailabilityZones returned an error: unable to discover AWS AccessKeyID and/or SecretAccessKey - see <https://pulumi.io/install/aws.html> for details on configuration
at Object.callback (/snapshot/awsx/node_modules/@pulumi/pulumi/runtime/invoke.js:141:33)
at Object.onReceiveStatus (/snapshot/awsx/node_modules/@grpc/grpc-js/src/client.ts:338:26)
at Object.onReceiveStatus (/snapshot/awsx/node_modules/@grpc/grpc-js/src/client-interceptors.ts:426:34)
at Object.onReceiveStatus (/snapshot/awsx/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
at /snapshot/awsx/node_modules/@grpc/grpc-js/src/call-stream.ts:276:24
at processTicksAndRejections (node:internal/process/task_queues:78:11)
Error: invocation of aws:index/getAvailabilityZones:getAvailabilityZones returned an error: unable to discover AWS AccessKeyID and/or SecretAccessKey - see <https://pulumi.io/install/aws.html> for details on configuration: Error: invocation of aws:index/getAvailabilityZones:getAvailabilityZones returned an error: unable to discover AWS AccessKeyID and/or SecretAccessKey - see <https://pulumi.io/install/aws.html> for details on configuration
at Object.callback (/snapshot/awsx/node_modules/@pulumi/pulumi/runtime/invoke.js:141:33)
at Object.onReceiveStatus (/snapshot/awsx/node_modules/@grpc/grpc-js/src/client.ts:338:26)
at Object.onReceiveStatus (/snapshot/awsx/node_modules/@grpc/grpc-js/src/client-interceptors.ts:426:34)
at Object.onReceiveStatus (/snapshot/awsx/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
at /snapshot/awsx/node_modules/@grpc/grpc-js/src/call-stream.ts:276:24
at processTicksAndRejections (node:internal/process/task_queues:78:11)
stocky-restaurant-98004
10/09/2023, 6:22 PMpulumi about
?handsome-businessperson-23021
10/09/2023, 10:54 PM$ pulumi about
CLI
Version 3.87.0
Go Version go1.21.2
Go Compiler gc
Plugins
NAME VERSION
aws 5.4.0
awsx 1.0.0
docker 3.2.0
eks 0.41.0
go unknown
kubernetes 3.17.0
Host
OS darwin
Version 14.0
Arch arm64
This project is written in go: executable='/opt/homebrew/bin/go' version='go version go1.21.2 darwin/arm64'
Backend
Name laptop-name
URL <s3://some-bucket-name/vpc-test>
User miro
Organizations
Token type personal
Dependencies:
NAME VERSION
<http://github.com/pulumi/pulumi-awsx/sdk|github.com/pulumi/pulumi-awsx/sdk> 1.0.0
<http://github.com/pulumi/pulumi-eks/sdk|github.com/pulumi/pulumi-eks/sdk> 0.41.0
<http://github.com/pulumi/pulumi/sdk/v3|github.com/pulumi/pulumi/sdk/v3> 3.74.0
Pulumi locates its logs in /var/folders/qn/56sv8gqj0195tt2bssfj9nk40000gn/T/ by default
warning: Failed to get information about the current stack: No current snapshot