- There are many web apps provide the service of shortening your long url (free or charged). This ariticle introduces the way of using serverless with Cloud development toolkit (CDK)
- CDK helps to create this project by coding (python language), What’s its benefits?
+ Infra structure as code
+ Update lambda function code and just need to execute cdk deploy, all the code and modules will be up-to-date
+ Create and destroy the structure quickly, and we can manage the structure by separate stacks such dynamodb stack, IAM stack, lambda stack and API Gateway stack.
⚡ $ cdk synth Successfully synthesized to ~/shorten-url/cdk.out Supply a stack id (ShortenUrlDDB, ShortenUrlIAMRole, ShortenURLCreateLambda, ShortenURLRedirectLambda, ShortenURLApiGW) to display its template.
List stacks
⚡ $ cdk ls ShortenUrlDDB ShortenUrlIAMRole ShortenURLCreateLambda ShortenURLRedirectLambda ShortenURLApiGW