Is there some steps that I am missing or am I running into a bug?
kops version
Version 1.5.3 (git-46364f6)
#aws s3 mb s3://test_test_test_test
make_bucket: test_test_test_test
aws s3api list-buckets --query 'Buckets[].Name' | grep test_test_test_test
"test_test_test_test",
#kops create cluster --zones us-east-1a --name test.net -v 3 --state s3://test_test_test_test
I0402 20:48:04.178011 25878 s3context.go:143] Querying S3 for bucket location for test_test_test_test
error reading cluster configuration "test.net": error reading s3://test_test_test_test/test.net/config: Could not retrieve location for AWS bucket test_test_test_test
The code here gets the bucket location. As mentioned in the comments you need to be the bucket owner.
Seems the user executing kops will also need to have permissions to execute GetBucketLocation and EC2::DescribeRegions.
See https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html for more details on the request.
I created & listed the bucket prior to running 'kops create cluster'. I actually just tried using go-sdk and was able to list the s3 bucket.
(I do have multiple aws profile; not sure if that makes any difference)
It does. Try using putting AWS_PROFILE before the command like AWS_PROFILE=xxx kops ...
I probably didn't word it correctly but I meant if have multiple profiles somehow mess up kops (seem unlikely) but I was already in the right profile.
Ok I figured it; solution is to explicitly export AWS_ACCESS_KEY_ID & AWS_ACCESS_KEY_ID.
(Since I have multiple profiles; I used export AWS_PROFILE for aws cli but it is not enough for kops)
Ok I figured it; solution is to explicitly export AWS_ACCESS_KEY_ID & AWS_ACCESS_KEY_ID.
(Since I have multiple profiles; I used export AWS_PROFILE for aws cli but it is not enough for kops)
I used aws configure I then entered my AWS Access Key and Secret Access Key and voila, kops worked!
Most helpful comment
Ok I figured it; solution is to explicitly export AWS_ACCESS_KEY_ID & AWS_ACCESS_KEY_ID.
(Since I have multiple profiles; I used export AWS_PROFILE for aws cli but it is not enough for kops)