Skip to content

ngx-aws 1.0.0

Install from the command line:
Learn more about npm packages
$ npm install @shiftcode/ngx-aws@1.0.0
Install via package.json:
"@shiftcode/ngx-aws": "1.0.0"

About this version

@shiftcode/ngx-aws

Angular Services working with AWS

Cloudwatch Logger

Send Logs to AWS CloudWatch Logs

Use the CloudWatchErrorHandler to send uncaught errors to CloudWatch Logs

Example Usage

import { ErrorHandler, NgModule } from '@angular/core'
import { LOG_TRANSPORTS, LogLevel } from '@shiftcode/ngx-core'
import {
  CLOUD_WATCH_LOG_TRANSPORT_CONFIG,
  CloudWatchErrorHandler,
  CloudWatchLogTransport,
  CloudWatchLogTransportConfig,
} from '@shiftcode/ngx-aws'

const cloudWatchLogConfig: CloudWatchLogTransportConfig = {
  awsRegion: 'eu-central-1',
  logLevel: LogLevel.WARN,
  logGroupName: 'client-log-group-name',
  flushInterval: 3000,
  awsCredentials$: of({/* get your credentials */}),
}

@NgModule({
  providers: [
    { provide: CLOUD_WATCH_LOG_TRANSPORT_CONFIG, useValue: cloudWatchLogConfig },
    { provide: LOG_TRANSPORTS, useClass: CloudWatchLogTransport, multi: true },
    { provide: ErrorHandler, useClass: CloudWatchErrorHandler },
  ],
})
export class AppModule {}

depends on

  • @angular/core + @angular/common
  • rxjs
  • @aws-sdk/client-cloudwatch-logs + @aws-sdk/types
  • @shiftcode/ngx-core
  • @shiftcode/utilities

Details


Assets

  • ngx-aws-1.0.0-npm.tgz

Download activity

  • Total downloads 561
  • Last 30 days 0
  • Last week 0
  • Today 0