I'm trying to use Gaufrette with Aws SDK2, and I'm getting the following error on a cache:clear after configuring:
[Aws\Common\Exception\InvalidArgumentException]
The provided signature value is not an instance of S3SignatureInterface
Here is my setup.
composer.json
"aws/aws-sdk-php": "2.6.*@dev"
config.yml
services:
src.aws_s3.client:
class: Aws\S3\S3Client
factory_class: Aws\S3\S3Client
factory_method: 'factory'
arguments:
key: %amazon_aws_key%
secret: %amazon_aws_secret_key%
region: US Standard
...
knp_gaufrette:
adapters:
media_adapter:
aws_s3:
service_id: 'src.aws_s3.client'
bucket_name: my.bucket
options:
directory: 'media'
GitHub: https://github.com/KnpLabs/KnpGaufretteBundle/issues/90
The problem was a mistake in the arguments of the service declaration (which I should've seen). It needs to be a collection like so:
config.yml
services:
src.aws_s3.client:
class: Aws\S3\S3Client
factory_class: Aws\S3\S3Client
factory_method: 'factory'
arguments:
- key: %amazon_aws_key%
secret: %amazon_aws_secret_key%