# common-aws-utils

> Common utilities to simplify interacting with the AWS node SDK

Latest version **1.9.1** (published 2023-10-16) · 0 weekly downloads

## Install

```sh
npm install common-aws-utils
pnpm add common-aws-utils
yarn add common-aws-utils
bun add common-aws-utils
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.9.1 |
| Published | 2023-10-16 |
| First published | 2023-10-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 27.6 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | Aziz Ahmed |
| Maintainers | aziz1975 |
| Keywords | aws, node, s3, ssm, api, gateway |

## Links

- npm: https://www.npmjs.com/package/common-aws-utils
- Repository: XYZ
- npm.io page: https://npm.io/package/common-aws-utils

## Dependencies (4)

- [aws4](https://npm.io/package/aws4.md) ^1.9.1
- [axios](https://npm.io/package/axios.md) ^0.18.0
- [axios-retry](https://npm.io/package/axios-retry.md) ^3.1.9
- [node-mailer](https://npm.io/package/node-mailer.md) ^0.1.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.9.1 (latest) — 2023-10-16
- 1.9.0 — 2023-10-16
- 1.8.3 — 2023-10-12

## README

# AWS Node Utilities
This project contains common services to simplify working with the AWS node sdk.  It includes
services for the following AWS services:
* SSM (e.g. find parameter values)
* S3 (e.g. read/write objects)
* Email (e.g. send email)
* API Gateway (e.g. REST API calls)

## Installation
To leverage this utility in other projects run the following commands:
````
# Core util
npm --registry=https://registry.npmjs.org/ install common-aws-utils
# Needed to sign API calls
npm install aws4
````
If this is being used in a AWS lambda then the following packages should be installed as dev only 
since it is included by default in the lambda runtime and the zip should be as small as possible
````
npm install --save-dev aws-sdk
````

## Example (how to use this library)
````
const API_SRV = require('common-aws-utils').AwsApiService;
const SSM_SRV = require('common-aws-utils').AwsSsmService;
const S3_SRV = require('common-aws-utils').AwsS3Service;
const EMAIL_SRV = require('common-aws-utils').AwsEmailService;

// SSM service
const SSM_PATH = process.env.SSM_PATH;
const ssmParams = await SSM_SRV.getParamsByPath(SSM_PATH, true);

// API service
const response = await API_SRV.post(base, path, data, params, headers);

// S3 service
const s3Data = await S3_SRV.getObject(bucket, key);

// Email service
const emailResponse = await EMAIL_SRV.sendEmail(
  '"Reporting Teams" <aziz.ahmed@act.org>',
  userEmail,
  `${ssmParams.EMAIL_NOTIFICATION_SUBJECT}`,
  JSON.stringify(message)
);

````

---
_Source: https://npm.io/package/common-aws-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
