Building an Authenticated GraphQL API on AWS with CDK - Enabling Admin Privileges and Multi-auth

preview_player
Показать описание
In this video I will create an AWS AppSync API with AWS CDK to build out a product API for a basic E Commerce backend.

The API will enable multiple authorization scenarios - both public and private access - to enable unauthenticated users to read and authenticated users who are part of an Admin group to create, update and delete products.

Workshop materials & code:

0:00 - Introduction
0:45 - Creating the project & installing dependencies
2:04 - Creating the Cognito service
3:21 - Creating the AppSync API
8:55 - Creating the Lambda function
10:11 - Defining the resolvers
10:56 - Creating the DynamoDB table
12:35 - Creating the CFN outputs
13:36 - Writing the function code
24:00 - Running a build and deploying the services
25:31 - Testing it out
30:49 - Conclusion
Рекомендации по теме
Комментарии
Автор

THANK YOU. These step by step builds have made it so easy for me to improve my backend skillset. Please keep making them!

Btimesthreee
Автор

Thanks for showing both methods of auth as well as the finer details of the updateProduct mutation. Clear and concise!

kristiehoward
Автор

Thanks Nader. I am building a "Cloud résumé" right now and your videos help a lot !

markkuuss
Автор

Love this channel. They should link these videos in aws docs.. Really great work here.... So many useful content. Its like if you didn't pay attention for a single moment you would miss a lot of important information. Please do more videos on CDK.

samthetester
Автор

Thanks Nader, this is another exciting video!

rorycawley
Автор

Thank you for clear and coincise explanation: really helped in getting me started!

finitehobbies
Автор

thats just so fucking hot. I just finished this implementation and I'm hyped

datoubi
Автор

Node 14.x is now supported officially by AWS and implemented in CDK.

ApoorvMote
Автор

Nader I am switching from UUID to nano ID. What are your thought?

ApoorvMote
Автор

Hey Nader, I will really appreciate if you can show how to connect it from the frontend side. much thanks!

עידובלייכר
Автор

This was great, thanks! Can anyone help me find more robust examples of how the CDK is used in production at large companies? I find that I'm having to come up with my own solutions for things like repository structure, which is fine and any developer should be able to, but I fear we may be setting up for failure in the future by not following best practices...

Dillonharless
Автор

Hey man, great vid, are you considering updating this video for CDK v2?

xdrap
Автор

Hi Nader, great videos. I'm watching all of your videos, this really is a good source of information.

As for the api generated by the cdk, will I be able to import it with apmplify pull normally, even not editing the api? just using codegen to generate queries, mutations and subscriptions? Another question, how do you use more than one api, or do not use it, for example, in this code, would you create several modules in the same project with their specific functions?

gilvaju
Автор

Thank you very much for the video!
I have one question that i cannot find the answer anywhere else.
When defining the schema and trying to use the directives, i get the code in red saying "Unknown directive "aws_cognito_user_pools""
Have you set this up before creating the schema?
Thank you very much for your time

NyloXD
Автор

As always, CDK feels like cheating :)

andrestone
join shbcf.ru