aws-service-operator
aws-service-operator copied to clipboard
S3 error: Unable to get the object https://s3.eu-west-1.amazonaws.com/aws-operator/ecrrepository.yaml
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
Seems that its related to https://github.com/awslabs/aws-service-operator/issues/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
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 https://github.com/awslabs/aws-service-operator/issues/196) may result in a bucket name that is not globally unique.
https://github.com/awslabs/aws-service-operator/pull/194