Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-url-shortener

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-url-shortener

Construct for an extensible URL shortener service built on DynamoDB and API Gateway

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
Maintainers
0
Weekly downloads
 
Created
Source

aws-url-shortener

Base API Gateway-driven URL shortener built on AWS with no compute resources

Install

npm i aws-url-shortener

Usage

See documentation on UrlShortener construct.

Example with default properties

const app = new App()
const stack = new Stack(app, 'UrlShortenerStack')
const cert = new Certificate(testStack, 'UrlShortenerCertificate', {
    domainName: 'example.com'
})
new UrlShortener(testStack, 'UrlShortener', {
    certificate: cert,
    domain: {
        base: 'example.com',
        subdomain: 'link'
    }
})

Example with access log

const app = new App()
const stack = new Stack(app, 'UrlShortenerStack')
const cert = new Certificate(testStack, 'UrlShortenerCertificate', {
    domainName: 'example.com'
})
const accessLogGroup = new LogGroup(testStack, 'UrlShortenerAccessLogGroup', {
    logGroupName: `/aws/apigateway/url-shortener-access`,
    removalPolicy: RemovalPolicy.DESTROY,
    retention: RetentionDays.ONE_MONTH
})
new UrlShortener(testStack, 'UrlShortener', {
    apiDeployOptions: {
        loggingLevel: MethodLoggingLevel.INFO,
        accessLogDestination: new LogGroupLogDestination(accessLogGroup)
    },
    certificate: cert,
    domain: {
        base: 'example.com',
        subdomain: 'link'
    }
})

License

Licensed under Apache 2.0

Keywords

FAQs

Package last updated on 01 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc