2

I am trying to connect to an AWS Elasticsearch domain using FOSElasticaBundle (version v6.0.0-beta4). According to the documentation, this bundle uses ruflin/Elastica bundle. After researching the documentation and the related questions here, I could find some examples and configuration that I implemented, however, I am getting an error related to the elastica configuration. My config:

//config/packages/fos_elastica.yaml

fos_elastica:
    clients:
        default:
            url: 'aws-elasticsearch-domain-url'
            aws_access_key_id: 'access-key'
            aws_secret_access_key: 'secret-key'
            aws_region: "aws-region"
            transport: "AwsAuthV4"
    indexes:
        (indexes configuration...)

When populating the indexes, I am getting this error related to the AwsAuthV4 transport parameter:

In AwsAuthV4.php line 43:
                                                                         
  Attempted to load class "SignatureV4" from namespace "Aws\Signature".  
  Did you forget a "use" statement for another namespace?

I am unsure whether this is not supported, not properly configured, or something else.

MaxPower
  • 45
  • 1
  • 12

1 Answers1

0

Make sure that when you are using FOSElasticaBundle you have installed also package called aws/aws-sdk-php. This package will guarantee that calss Aws\Signature\SignatureV4 will be loaded aswell.

In case you have still this problem remember to do composer dump-autoload in the console.

Eddy
  • 593
  • 8
  • 22