- How do I install renoki-co/aws-elastic-client in a Laravel app?
- Install it with Composer using composer require renoki-co/aws-elastic-client. In Laravel, the package ships a service provider and facade, so you can publish its config and supply your AWS region, endpoint, and credential settings. Most of the setup time is usually spent on IAM policy rather than the package itself.
- Which Laravel and PHP versions does aws-elastic-client support?
- The package targets Laravel 8/9-era applications and a PHP 8.0+ runtime, with version 1.3.0 dropping PHP 7.4. The exact PHP floor in 1.3.0 has been described ambiguously, so check composer.json to confirm whether it is PHP 8.0 or 8.1 before upgrading. Do not assume support for newer Laravel majors without verifying the package constraints.
- How does this package sign requests to AWS Elasticsearch Service?
- It wraps the official Elasticsearch PHP client and signs each request with AWS Signature Version 4 using your credentials. That means you keep using the standard Elasticsearch client API for queries and only delegate request authentication to this package. You do not need to write custom signing middleware or manually add AWS auth headers.
- What AWS credentials does it use, IAM roles or access keys?
- It is designed for the normal AWS credential chain, such as ECS task roles, EC2 instance profiles, or IRSA, so long-lived access keys are not required. The package signs with whatever credentials the AWS SDK resolves. Static keys may work, but the package adds less value if you already have broad, long-lived credentials.
- Does it work with Amazon OpenSearch Service as well as Elasticsearch?
- It is intended for AWS-managed Elasticsearch/OpenSearch domains that accept SigV4-signed requests. It does not solve OpenSearch Serverless-specific API restrictions, cross-account resource policies, or every VPC-only endpoint scenario beyond what the AWS SDK and IAM already handle. Confirm your cluster type and access policy before relying on it.
- Is this package a replacement for Laravel Scout?
- No. It is a thin authentication adapter around the official Elasticsearch PHP client, not a search abstraction or Scout driver. If your application expects Laravel Scout, confirm the driver story separately instead of assuming this package provides it.
- Which elasticsearch/elasticsearch client version should I use with it?
- The package does not abstract queries; it passes them to elasticsearch/elasticsearch, so that client's major version must match your cluster generation. The most consequential line in the package's composer.json is its elasticsearch/elasticsearch constraint, especially after a cluster upgrade. Check that constraint and triangulate it with your PHP version before pinning.
- How do I configure the AWS region and Elasticsearch endpoint?
- Publish the package config and set the AWS region and the Elasticsearch/OpenSearch endpoint for your domain. Credentials are resolved through the AWS SDK, so you normally configure them via the standard environment or IAM role rather than hard-coding them. Keep the endpoint and region aligned with the domain you are signing requests for.
- How do I test a Laravel app that uses this AWS Elasticsearch client?
- Because the package only signs requests, tests can usually mock the underlying Elasticsearch client or the HTTP transport rather than calling AWS. Keep the client construction behind your own binding so you can swap in a fake in tests. Integration tests against a real AWS domain are best treated as optional and run with scoped IAM credentials.
- Should I worry about maintenance, and what are the alternatives?
- It is a small, low-cadence package from a small organization, so treat maintainer concentration and abandonment as a real bus-factor risk. The upside is that it is a thin adapter: if you control construction of the Elasticsearch client, you can later replace it with plain AWS SDK SigV4 signing or another maintained option without rewriting search code. Pin the exact version and verify the composer.json constraints before upgrading.