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.

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

is existing elastica bundle works for AWS opensearch?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.