PHPackages                             norbybaru/laravel-aws-timestream - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. norbybaru/laravel-aws-timestream

ActiveLibrary[API Development](/categories/api)

norbybaru/laravel-aws-timestream
================================

Library to interact with AWS Timestream service via API

v1.0.0(1y ago)42.7k7[5 PRs](https://github.com/norbybaru/laravel-aws-timestream/pulls)MITPHPPHP ^8.1CI passing

Since May 7Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/norbybaru/laravel-aws-timestream)[ Packagist](https://packagist.org/packages/norbybaru/laravel-aws-timestream)[ Docs](https://github.com/norbybaru/laravel-aws-timestream)[ RSS](/packages/norbybaru-laravel-aws-timestream/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (8)Versions (15)Used By (0)

Laravel AWS Timestream
======================

[](#laravel-aws-timestream)

[![Run Unit Tests](https://github.com/norbybaru/laravel-aws-timestream/actions/workflows/run-tests.yml/badge.svg)](https://github.com/norbybaru/laravel-aws-timestream/actions/workflows/run-tests.yml)[![PHPStan](https://github.com/norbybaru/laravel-aws-timestream/actions/workflows/phpstan.yml/badge.svg)](https://github.com/norbybaru/laravel-aws-timestream/actions/workflows/phpstan.yml)

AWS Timestream is a fast, scalable, and serverless time series database service. This package is an opinionated implementation to query timestream and ingest data into timestream.

Upgrading from version `0.2.x`
------------------------------

[](#upgrading-from-version-02x)

Please not that version `0.3.x` is still backward compatible with version `0.2.x`. No breaking changes introduced, however i will suggest you slowly use the new Payload builder approach for Timestream ingestion as from version `0.4.x` we shall drop support for legacy builder.

See updated examples below start using new approach with `TimestreamPayloadBuilder`.

Install
-------

[](#install)

```
composer require norbybaru/laravel-aws-timestream
```

Configuration
-------------

[](#configuration)

- Publish config

```
php artisan vendor:publish --provider="NorbyBaru\AwsTimestream\TimestreamServiceProvider" --tag="timestream-config"
```

- Open `timestream.php` config file and setup your database name and tables
- Setup you AWS Timestream keys and permissions with the following environment variable

```
AWS_TIMESTREAM_KEY=
AWS_TIMESTREAM_SECRET=
AWS_TIMESTREAM_PROFILE=

```

Basic Usage
-----------

[](#basic-usage)

### Query Timestream

[](#query-timestream)

Using `TimestreamBuilder::query()` will give autocomplete of all available functions

1. Using `TimestreamBuilder` to build query to be passed onto `TimestreamReaderDto` which generate am object that can be consumed by `TimestreamService` query function

```
