KnpLabs/KnpGaufretteBundle

The configured bucket ** does not exists

Cypaubr opened this issue · 6 comments

I have a weird issue, I followed the configuration steps for the bundle and the AWS S3 adapter but I still get this error: "The configured bucket "phive-pictures" does not exist.".

Here is the service config:

phive.aws_s3_client:
        class: Aws\S3\S3Client
        factory: [Aws\S3\S3Client, 'factory']
        arguments:
            -
                version: latest
                region: '%env(resolve:AWS_S3_REGION)%'
                credentials:
                    key: '%env(resolve:AWS_S3_KEY)%'
                    secret: '%env(resolve:AWS_S3_SECRET)%'

My .env part for AWS:

AWS_S3_REGION=eu-west-1
AWS_S3_KEY=AKIAR****
AWS_S3_SECRET=ddjKjY****

And my adapters:

knp_gaufrette:
  stream_wrapper: ~

  adapters:

    user_pictures:
      aws_s3:
        service_id: 'phive.aws_s3_client'
        bucket_name: 'phive-pictures'
        detect_content_type: true
        options:
          directory: 'user/pictures'
          acl: public

I ensured the bucket exists on the AWS console and is on the right region "eu-west-1" and the AWS user has full access over S3. For information I use the VichUploaderBundle to manage the uploads but it seems to work fin with Google Cloud Storage Adapter.

Hi @Cypaubr, have you found a solution? I have the same problem.

Hi @Cypaubr and @RmTrnsc . I am also having the same issue. Did either of you find a solution?

@chrisbuerkle i'm currently having the same issue. any solutions?

solved my problem. "s3:ListBucket" permission was missing.

Nek- commented

This looks like a wrong configuration directly inside AWS.