1.0.7 • Published 11 months ago

aws-url-shortener v1.0.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

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

1.0.7

11 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago