npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@copper/plugin-timestream

v1.0.1

Published

Architect (arc.codes) serverless framework plugin that defines AWS Timestream databases and tables

Downloads

6

Readme

plugin-timestream

Architect serverless framework plugin that defines AWS Timestream databases and tables

AWS Timestream is a time series database. This arc plugin allows you to define a Timestream database per arc application, and as many Timestream tables in this database as you want.

Installation

  1. Install this plugin: npm i @copper/plugin-timestream

  2. Add the following line to the @plugins pragma in your Architect project manifest (usually app.arc):

     @plugins
     copper/plugin-timestream

Usage

Define as many tables as you want under a @timestream section, optionally nesting Timestream retention options under each table:

@timestream
simple-table
custom-retention-table
  MagneticStoreRetentionPeriodInDays 90
  MemoryStoreRetentionPeriodInHours 72

To access your defined tables at runtime from within your project's Lambda functions, import the TimestreamWrite and TimestreamQuery AWS SDK service objects. The methods available on these objects will require you to provide the database and table name for your Timestream tables. The values you should use for these are:

  • Database name: the name of your arc application as defined at the top of your app.arc file.
  • Table name: the name of each table as defined under the @timestream section of your app.arc file.

For an example, see the sample application's get-index code under ./sample-app/src/http/get-index/index.js.

Options

The following options can be passed, nested (indented) under each table name definition in your app.arc file:

|Option|Description|Example| |---|---|---| |MagneticStoreRetentionPeriodInDays|Specifies the retention properties for magnetic storage for the table in number of days. Default is 1 day.|MagneticStoreRetentionPeriodInDays 90| |MemoryStoreRetentionPeriodInHours|Specifies the retention properties for memory storage for the table in number of hours. Default is 1 hour.|MemoryStoreRetentionPeriodInHours 72|

Sample Application

There is a sample application located under sample-app/. cd into that directory, npm install and you can run locally via arc sandbox or deploy to the internet via arc deploy.

Testing Locally

TODO: This plugin does not provide a local development experience at this time. Coming soon!

Testing the Deployed Version

The sample application (under ./sample-app) is ready deploy to arc deploy:

  1. cd sample-app
  2. npm install
  3. arc deploy
  4. Load the deployed URL.
  5. The main route of the application will both write a time series data point as well as query for all data points and list them out in the HTTP response. For details, check out the get-index route code under ./sample-app/src/http/get-index.

Contributing

Thanks for considering contributing to this project! Check out the contribution guidelines for details.