<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Radek </title>
    <description>The latest articles on DEV Community by Radek  (@radek_dudek).</description>
    <link>https://dev.to/radek_dudek</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F935276%2Fc53e7be0-5b1e-4412-b18c-5be81edac087.jpeg</url>
      <title>DEV Community: Radek </title>
      <link>https://dev.to/radek_dudek</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/radek_dudek"/>
    <language>en</language>
    <item>
      <title>Amplify API Auth with Cognito Custom Scopes - overview and temporary solution</title>
      <dc:creator>Radek </dc:creator>
      <pubDate>Mon, 23 Jan 2023 14:44:18 +0000</pubDate>
      <link>https://dev.to/radek_dudek/amplify-api-auth-with-cognito-custom-scopes-overview-and-temporary-solution-557k</link>
      <guid>https://dev.to/radek_dudek/amplify-api-auth-with-cognito-custom-scopes-overview-and-temporary-solution-557k</guid>
      <description>&lt;p&gt;Recently I have faced a truly annoying problem, whose understanding took me 1 week. Here is a simple overview of the problem and potential solution which I found:&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Amplify is a tool which helps frontend developers create and manage backend resources. It comes with predefined libraries which take care of implementing communication with AWS Backend.  With Amplify, we can easily create authorization which work with Cognito and Rest API requests for API Gateway. The problem begin when we want to use Cognito User pool authorization for Rest API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;Due to &lt;a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html"&gt;AWS Docs &lt;/a&gt; to restrict Rest API with Cognito User pool you should create &lt;em&gt;Resource server&lt;/em&gt; and protect your endpoints with &lt;em&gt;Custom scope&lt;/em&gt;. However, Amplify, and even more precisely &lt;em&gt;AndroidSDK&lt;/em&gt;, doesn't return Custom Scopes if Hosted UI is not used --&amp;gt; &lt;a href="https://github.com/aws-amplify/aws-sdk-android/issues/684"&gt;link to Issue&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;If you don't want to use Hosted UI, currently you cannot use Custom Scopes.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  First solution - stick with what you got
&lt;/h2&gt;

&lt;p&gt;Use &lt;em&gt;aws.cognito.signin.user.admin&lt;/em&gt; scope to protect endpoints. It's not perfect solution, it can work only if all your endpoints requires same permissions. It's still better than not protecting your endpoints at all. If you don't use any scope at API Endpoints, by default API Gateway would assume that &lt;em&gt;openid&lt;/em&gt; scope is used, which will result in authenticating to API with &lt;em&gt;ID token&lt;/em&gt; instead of &lt;em&gt;Access Token&lt;/em&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Second solution - do it yourself
&lt;/h2&gt;

&lt;p&gt;If your project requires Custom Scopes and you really don't want to use Hosted UI for your mobile app, you have to implement token management yourself. You can do it by sending a request for &lt;em&gt;Grant Code&lt;/em&gt; and then sending another request for all tokens with Cognito credentials in the body. You also have to take care of proper protection of all requests. It's harder because you have to take care of token management by yourself (as well, you could not use Amplify/AWS SDK at all). &lt;/p&gt;

&lt;h2&gt;
  
  
  Third solution - move to Hosted UI
&lt;/h2&gt;

&lt;p&gt;It is what it is. The simplest solution would be using Hosted UI since there are no other options right now.  Let's hope that AWS will  provide further improvements in the nearest future.&lt;/p&gt;

&lt;p&gt;None of this solution is perfect, and the most recommended would be moving to Hosted UI, which will result in lower user experience. &lt;/p&gt;

</description>
      <category>cognito</category>
      <category>aws</category>
      <category>amplify</category>
    </item>
    <item>
      <title>Why you can't go wrong with AWS as student</title>
      <dc:creator>Radek </dc:creator>
      <pubDate>Mon, 23 Jan 2023 14:32:01 +0000</pubDate>
      <link>https://dev.to/radek_dudek/why-you-cant-go-wrong-with-aws-as-student-c84</link>
      <guid>https://dev.to/radek_dudek/why-you-cant-go-wrong-with-aws-as-student-c84</guid>
      <description>&lt;p&gt;6 months ago I have started my work as an AWS Cloud developer. Before this, I had close to zero knowledge of Cloud. So if you are a student, be smarter than me and start learning it right now.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. It's BIG
&lt;/h2&gt;

&lt;p&gt;At your university, you probably learn many different things, and you still know that's not all of it. You hear about so many specializations, different skills, different techs. So if you heard about something, there is quite big chance that AWS already has a solution for it. &lt;br&gt;
It doesn't really matter what you are planning to do after university - AWS for sure has some tool for you. Here are some examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Would you like to do backend? - check serverless approach with Lambda.&lt;/li&gt;
&lt;li&gt;Front-end dev with React? - have you heard about static hosting on S3?&lt;/li&gt;
&lt;li&gt;Network Admin? - AWS got all you want - DNS/Routing/VPC.&lt;/li&gt;
&lt;li&gt;How about mobile dev? - You can be interested in Amplify!&lt;/li&gt;
&lt;li&gt;Machine learning/AI? - SageMaker has a lot of tools for you.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still not sure? You probably faced a problem where you had to install a Linux machine for some school project. With AWS EC2, you can run it with 1 command in less than a minute! &lt;/p&gt;

&lt;h2&gt;
  
  
  2. It's universal
&lt;/h2&gt;

&lt;p&gt;You know that learning programming is not about learning a programming language - it is about learning how to solve problems. With AWS, you can do the same. Probably, it's even easier. You don't really have to learn any syntax. You just have to start using it. What's even more important, there are not so many cloud providers. If you learn something in AWS, you will definitely catch it in different cloud platform. Also, due to the huge movement toward cloud computing, more and more applications rely on Cloud. Even if you don't use the cloud, there is quite big chance that someone in your team is using it. Wouldn't be nice to know what they are talking about?&lt;/p&gt;

&lt;h2&gt;
  
  
  3. It's impressive
&lt;/h2&gt;

&lt;p&gt;We all know multilingual people. It's truly impressive when someone starts to talk in fluent Spanish while his first language is German. Same goes with AWS, especially if you are not applying for DevOps work. Imagine recruiting React Dev who has AWS skills in his CV. It might not be so useful for this project, but if your applicant had learnt the basics of AWS, he can definitely manage his daily duties.  &lt;/p&gt;

&lt;h2&gt;
  
  
  4. It's better paid
&lt;/h2&gt;

&lt;p&gt;Are you earning a good salary as Python Dev? You can earn more by being Python Dev in Cloud. Currently, cloud positions have the highest salary in all IT industry. Check the stats.  &lt;/p&gt;

</description>
      <category>programming</category>
      <category>softwaredevelopment</category>
      <category>challenge</category>
    </item>
  </channel>
</rss>
