Socket
Socket
Sign inDemoInstall

aws-url-shortener

Package Overview
Dependencies
41
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

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


Version published
Weekly downloads
95
increased by3066.67%
Maintainers
1
Created
Weekly downloads
 

Readme

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

Last updated on 04 May 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc