Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build your first CRUD API in 60 minutes or less with AWS CDK

Build your first CRUD API in 60 minutes or less with AWS CDK

I used these slides when giving the CDK201 workshop (https://github.com/skabba/cdk201) on the AWS Community Day 2022.

Enri Peters

January 23, 2023
Tweet

More Decks by Enri Peters

Other Decks in Technology

Transcript

  1. Welcome! In this workshop you will create a CRUD API

    that Creates, Reads, Updates and Deletes items from a DynamoDB table. The API will run serverless, so there is no management of the underlying infrastructure and scaling is done automatically. You will learn how easy it is to create an API on AWS with AWS CDK, all within 60 minutes. The workshop features the creation of a DynamoDB table, HTTP API Gateway and a Lambda function. This workshop is based on https://catalog.us-east- 1.prod.workshops.aws/workshops/2c8321cb-812c-45a9-927d-206eea3a500f/en-US. But has been pimped so you can do the same but with AWS CDK code. Come join us: careers.schubergphilis.com
  2. Brief introduction Please RAISE YOUR HANDS if you know what

    all the following things mean. And don’t be ashamed if you don’t know, we all are here to learn! • Integrated development environment (IDE) • Create, Read, Update, and Delete (CRUD) • Application programming interface (API) • Amazon API Gateway • AWS CloudFormation • AWS Cloud Development Kit (CDK) • Amazon DynamoDB • AWS Lambda Come join us: careers.schubergphilis.com
  3. Preparations This workshop will be executed from within an AWS

    Cloud9 (Online IDE) environment. 1. Goto https://obsessedbyaws.signin.aws.amazon.com/console 2. Login with your username + password (on your desk) 3. Make sure you are in the Ireland (eu-west-1) region 4. Goto https://eu-west-1.console.aws.amazon.com/cloud9/home# 5. Locate your Cloud9 environment and click on “Open IDE” 6. Goto https://github.com/skabba/cdk201 for the workshop instructions 7. Goto Step 1 and wait for me to give some hints Come join us: careers.schubergphilis.com
  4. Hint 1 DO NOT USE SPECIAL CHARACTERS WHEN EXPORTING THESE

    ENVIRONMENT VARIABLES: • FIRST_NAME • LAST_NAME Come join us: careers.schubergphilis.com
  5. Hint 2 DO NOT FORGET TO SAVE YOUR FILES BY

    USING EITHER: • WINDOWS: CTRL + S • MAC: CMD + S Come join us: careers.schubergphilis.com
  6. Hint 3 You can ignore the following warning while doing

    this workshop: current credentials could not be used to assume 'arn:aws:iam::803120882800:role/cdk-hnb659fds-deploy-role-803120882800-eu-west-1', but are for the right account. Proceeding anyway. Come join us: careers.schubergphilis.com
  7. Hint 4 Sometimes your are asked something like this: Are

    you sure you want to delete: MyFirstCrudApiEnriPetersStack (y/n)? You can answer these with y Come join us: careers.schubergphilis.com
  8. Thank you and please come by to give some feedback

    Come join us: careers.schubergphilis.com