To deploy, call cdk deploy
with the required parameters:
cdk deploy --parameters DomainName=mydomain.tld \
--parameters Subdomain=myurls \
--parameters CertificateArn=arn:aws:acm:us-east-1:$AWS_ACCOUNT:certificate/... \
--parameters HostedZoneId=ZZZZZZZZZZZZZ
An autogenerated bucket name will be output.
To create a new short URL, just create a new file on the bucket with the destination URL as its contents:
echo "https://this-is-my-long-url.tld/and/i/need/it.to?be=shorter" | \
aws s3 cp - s3://linkshorteningstack-bucket0000000-0000000000000/my-short-url