FOSElasticaBundle
FOSElasticaBundle copied to clipboard
configuration with AWS Elasticsearch.
I am trying to connect to an AWS Elasticsearch domain using FOSElasticaBundle (version v6.0.0-beta4). After reading 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:
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.
You can use AWS' instances without authentication like so :
fos_elastica:
clients:
default:
host: 'host'
port: 443
transport: Https
Hi @MaxPowerReforged,
Just wondering if you had managed to find a resolution to this? Looking at using this bundle with opensearch myself.
Hi @MaxPowerReforged,
Just wondering if you had managed to find a resolution to this? Looking at using this bundle with opensearch myself.
Actually not, we ended up using a custom search without Elasticsearch, although I would love to have a solution and switch back. Sorry not to be more useful :)
Maybe it is worth trying the above solution
We've been using it for a long time. Simply secure the access using security groups.
Will give it a go and see what happens.
I believe You should install aws/aws-sdk-php through composer and Aws\Signature\SignatureV4 will autoload
Hello, we're trying to use the same and i'm kinda stuck with a weird issue.
When i'm runing bin/console fos:elastica:populate everything works and i'm able to connect and populate the indexes, but when i try and access something from the API, it returns error 500 (request.CRITICAL: Uncaught PHP Exception Elastica\Exception\Connection\HttpException: "Couldn't connect to host, Elasticsearch down?").
Elasticsearch 7.10 running in the same VPC as the EC2, and im able to make a CURL request from the EC2 instance.
Got it figured out, it was a problem with the API itself, not the EC2/VPC/OpenSearch configuration.