From the course: Complete Guide to Serverless Web App Development on AWS

Unlock this course with a free trial

Join today to access over 24,600 courses taught by industry experts.

Creating a simple API with AppSync and AWS CDK

Creating a simple API with AppSync and AWS CDK

- [Instructor] Now that you have your graphql schema, it's time to create your up sync API. Since we are using amplify graphql directives in our schema, we cannot use the standard up sync level to construct. Instead, we need to use the amplify graphql API construct that is a level three construct designed to work with amplify graphical directives. So you can find it in the construct hub, and here is the site and you can basically copy here and install it in your CDK project. So let's do that. Let's run that command. That will install the construct for us. And then we can start creating our amplify stack. Great. Now it's ready. Let's go into our leave and create here, an appsync-stack.ts And now we can start working on this new stack. So let's bring this here in order to start working and let's bring the basic imports that we need. We also will define a props because we'll need it in a second. So let's add this one at the beginning. And now we can start working on our API. So let's…

Contents