Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

S3 error: Unable to get the object https://s3.eu-west-1.amazonaws.com/aws-operator/ecrrepository.yaml #172

Open
yanivpaz opened this issue Feb 24, 2019 · 3 comments

Comments

@yanivpaz
Copy link

Hi
There is no proper documentation on how to use
<BUCKET_NAME> - (optional) The operator stores certain things in s3 create a bucket or provide an existing bucket for the operator to use i.e. aws s3 mb s3://foobar

I am getting the error below when I try to create the ecr registry as explained in the example :
time="2019-02-24T14:46:43Z" level=error msg="error creating ecrrepository 'example-repository-name-2'" error="ValidationError: S3 error: Unable to get the object https://s3.eu-west-1.amazonaws.com/aws-operator/ecrrepository.yaml\n\tstatus code: 400, request id: 00c1dd2e-3843-11e9-a2bc-47768777400d" hostname=aws-service-operator-85ff9558bb-hl2ml

@yanivpaz
Copy link
Author

yanivpaz commented Feb 24, 2019

Seems that its related to
#155
--bucket is missing when creating the operator

I solved it by adding the --bucket flag:
in configs/aws-service-operator.yaml
args:
- server
- --cluster-name=EKSCluster12
- --region=eu-west-1
- --account-id=582866566323
- --bucket=aws-operator-bucket

it seems that this bucket flag is mandatory in specific regions

@marcindulak
Copy link

The bucket argument needs to be mandatory.

"Bucket names must be unique across all existing bucket names in Amazon S3"

https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html

This means the bucket argument cannot have the default argument value of aws-operator https://github.com/awslabs/aws-service-operator/blob/76312848693937324f5920d771cde1abe2f51fdd/cmd/aws-service-operator/main.go#L57

Even generating a different default value of the s3 bucket name, using e.g. cluster-name + -aws-service-operator (see #196) may result in a bucket name that is not globally unique.

@marcindulak
Copy link

#194

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants