https://pulumi.com logo
#aws
Title
# aws
h

hundreds-portugal-17080

06/16/2020, 7:27 PM
With latest sdk's, creation of cluster is failing. Is this known issue?
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as awsx from "@pulumi/awsx";
import * as eks from "@pulumi/eks";

// Create an EKS cluster with the default configuration.
const cluster = new eks.Cluster("my-cluster");

// Export the cluster's kubeconfig.
export const kubeconfig = cluster.kubeconfig
Errors:
+    ├─ pulumi-nodejs:dynamic:Resource  my-cluster-vpc-cni              **creating failed**   1 error
 
+    └─ kubernetes:core:ConfigMap    my-cluster-nodeAccess             **creating failed**   1 error
Diagnostics:
 
pulumi:pulumi:Stack (dpstudio-dev):
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
  
error: update failed
 
pulumi-nodejs:dynamic:Resource (my-cluster-vpc-cni):
  
error: Command failed: kubectl apply -f /var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
  
To see help text, you can run:
   
aws help
   
aws <command> help
   
aws <command> <subcommand> help
  
aws: error: argument operation: Invalid choice, valid choices are:
  
create-cluster              | delete-cluster
  
describe-cluster             | describe-update
  
list-clusters              | list-updates
  
update-cluster-config          | update-cluster-version
  
update-kubeconfig            | wait
  
help
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
  
unable to recognize "/var/folders/h8/wv5qbxfn3254vqjqsf7lm69h0000gn/T/tmp-8927Kam6To1jc3md.tmp": Get <https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/api?timeout=32s>: getting credentials: exec: exit status 2
 
kubernetes:core:ConfigMap (my-cluster-nodeAccess):
  
error: configured Kubernetes cluster is unreachable: unable to load schema information from the API server: Get "<https://1E899CD28737866B1F4B0D888B3ECA7E.gr7.us-west-2.eks.amazonaws.com/openapi/v2?timeout=32s>": getting credentials: exec: exit status 2
Resources:
b

billowy-army-68599

06/16/2020, 7:46 PM
Can you check the output of aws sts get-caller-identity ?
h

hundreds-portugal-17080

06/16/2020, 7:57 PM
{   "Account": "<>",    "UserId": "<>",    "Arn": "arnawsiam&lt;&gt;root" }
b

broad-dog-22463

06/16/2020, 8:23 PM
@breezy-hamburger-69619 / @gorgeous-egg-16927 can you help here?
b

breezy-hamburger-69619

06/16/2020, 8:48 PM
I was able to successfully launch your example with a working cluster. It appears that your kubeconfig is hitting
aws
CLI related issues to request and embed an
aws eks get-token
into the kubeconfig for auth — which the vpcCNI and nodeAccess configMap use. My guess is that you’re aws CLI needs to be updated to a current version, as
aws eks get-token
came in after
v1.16.156
: https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html
We recommend at least
1.18.17
per https://github.com/pulumi/pulumi-eks#pre-requisites, but it appears AWS updated this to be >=
1.16.156
recently
h

hundreds-portugal-17080

06/16/2020, 8:54 PM
I see. Thanks for your explanation. I am using aws-cli/1.16.140. Trying to upgrade to latest and running it again. will keep you posted.
b

billowy-army-68599

06/16/2020, 9:14 PM
@hundreds-portugal-17080 the call from your
aws sts get-caller-identity
would indicate to me you don't have valid AWS credentials loaded, can you verify that? how are you loading your credentials?
h

hundreds-portugal-17080

06/16/2020, 10:00 PM
Thanks, it worked after upgrading to aws cli.
👍 1
@billowy-army-68599 I export the aws parameters using EXPORT command
3 Views