<?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: Amr</title>
    <description>The latest articles on DEV Community by Amr (@amrkamal).</description>
    <link>https://dev.to/amrkamal</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%2F1104987%2F33049316-cd7c-4674-ba40-26ef95ea0e15.jpeg</url>
      <title>DEV Community: Amr</title>
      <link>https://dev.to/amrkamal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amrkamal"/>
    <language>en</language>
    <item>
      <title>Amazon CodeWhisperer an AI Code Generator + Installation &amp; Demo</title>
      <dc:creator>Amr</dc:creator>
      <pubDate>Sat, 08 Jul 2023 07:19:50 +0000</pubDate>
      <link>https://dev.to/amrkamal/amazon-codewhisperer-installation-demo-n45</link>
      <guid>https://dev.to/amrkamal/amazon-codewhisperer-installation-demo-n45</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br&gt;
As the development landscape evolves, artificial intelligence (AI) is being integrated into software development tools to increase productivity and efficiency. Two such tools are &lt;strong&gt;Amazon CodeWhisperer&lt;/strong&gt; and &lt;strong&gt;GitHub Copilot&lt;/strong&gt;. Both tools use AI to analyze and suggest snippets to full functions code. But which one is better? In this article, we'll compare Amazon CodeWhisperer and GitHub Copilot to help you decide which tool to use for your development projects and showcase how to install Amazon CodeWhisperer and use it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon CodeWhisperer&lt;/strong&gt; is trained on billions of lines of code and can generate code suggestions ranging from snippets to full functions in real time based on your comments and existing code. Bypass time-consuming coding tasks and accelerate building with unfamiliar APIs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The programming languages with the most support are:&lt;br&gt;
Java | Python | JavaScript | TypeScript | C#&lt;/p&gt;

&lt;p&gt;But CodeWhisperer also supports code generation for:&lt;br&gt;
Ruby | Go | PHP | C++ | C | Shell | Scala | Rust | Kotlin | SQL&lt;/p&gt;

&lt;p&gt;There are 4 major advantages CodeWhisperer provides which are :&lt;/p&gt;

&lt;p&gt;1- CodeWhisperer can flag or filter code suggestions that resemble open-source training data. Get the associated open-source project’s repository URL and license 📝 so that you can more easily review them and add attribution.&lt;/p&gt;

&lt;p&gt;2- CodeWhisperer can Scan your code 🕵️‍♂️ to detect hard-to-find vulnerabilities, and get code suggestions to remediate them immediately. Align to best practices for tackling security vulnerabilities, such as those outlined by Open Worldwide Application Security Project (OWASP), or those that don't meet crypto library best practices and other similar security best practices.&lt;/p&gt;

&lt;p&gt;3- When it comes to writing code related to AWS services and technologies, CodeWhisperer typically does a better job than Copilot.&lt;/p&gt;

&lt;p&gt;4- It's 💯 FREE for Individual use! 🤯 &lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Copilot&lt;/strong&gt;, on the other hand, is an AI-powered code completion tool that suggests code snippets and functions based on the context of the code being written. Developed by GitHub and OpenAI, Copilot uses a machine learning model trained on billions of lines of code to generate code suggestions. Copilot is available as a Visual Studio Code extension.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub Copilot provides suggestions for numerous languages and a wide variety of frameworks, but works especially well for Python, JavaScript, TypeScript, Ruby, Go, C# and C++. GitHub Copilot can also assist in query generation for databases. &lt;/p&gt;

&lt;p&gt;GitHub Copilot and Amazon CodeWhisperer differ  in that Copilot is a general-purpose AI-driven development tool, while CodeWhisperer is primarily tailored to meet the needs of developers working with Amazon platforms, such as Amazon Web Services while supporting using programming languages of course.&lt;/p&gt;

&lt;p&gt;Although GitHub Copilot is hosted on a platform owned by Microsoft, it is not specifically designed to support Microsoft technologies or programming use cases associated with Microsoft.&lt;/p&gt;

&lt;p&gt;There is 1 major advantage Copilot provides which is :&lt;/p&gt;

&lt;p&gt;Copilot supports almost all of the major IDEs and more programming languages.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Making a Decision Between Amazon CodeWhisperer and GitHub Copilot 🤔 :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Personally I would use Amazon CodeWhisperer since it's free and integrates well with AWS Services and has major advantages for me to use that Github Copilot doesn't have which were discussed earlier but generally your choice might differ depending on which programming language or IDE you are using so make sure you use the suitable one for your usage and needs!&lt;/p&gt;




&lt;p&gt;Now for the exciting part! 🤩&lt;/p&gt;

&lt;p&gt;Let's start our tutorial on how to install Amazon CodeWhisperer and use it. 🧐 &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install the latest &lt;strong&gt;AWS Toolkit plugin&lt;/strong&gt; in your integrated development environment (IDE). &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Supported IDEs include Visual Studio (VS) Code and JetBrains IDEs.&lt;br&gt;
 We will be using Visual Studio Code in our demo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fLD5Sxw4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/btmqokbf98el64yg2dub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fLD5Sxw4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/btmqokbf98el64yg2dub.png" alt="AWS Toolkit" width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next you will navigate to your installed extensions on the left panel where you will find your newly installed plugin "AWS Toolkit" which has the AWS Logo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then you will choose CodeWhisperer from the developer tools panel then click start then Sign up like shown over here in the screenshot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9Jb15ZgJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wb73264igrclgtz0ywaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9Jb15ZgJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wb73264igrclgtz0ywaf.png" alt="Sign up on AWS Toolkit" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking on Sign up you will be asked to copy a code which you will need because after that you will be redirected to AWS to authorize the request of signing up and linking CodeWhisperer to your IDE through AWS skill builder.&lt;/p&gt;

&lt;p&gt;Follow the instructions to sign up or sign in if you already have an existing AWS skill builder ID and when you are done you will be receiving this message which says AWS Toolkit for VSCode can now access your data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3nsMm1xI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/stcjmzjwqy5ohzzvgk1a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3nsMm1xI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/stcjmzjwqy5ohzzvgk1a.png" alt="Linked AWS skill build ID with IDE" width="646" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💪 Congrats you have just enabled CodeWhisperer on your IDE and you can start coding with the power of AI ! 😎&lt;/p&gt;

&lt;p&gt;Here is a quick demo provided by AWS CodeWhisperer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--koHC-4Ph--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9v9zaq1ca93xwqrk57w.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--koHC-4Ph--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9v9zaq1ca93xwqrk57w.gif" alt="CodeWhisperer Demo" width="630" height="504"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;We have reached the end of the tutorial, Thank you 🙏 for taking the time to read and follow this tutorial. I hope that the information and guidance provided here has been helpful.&lt;/p&gt;

&lt;p&gt;If you have any questions though please leave a comment and I will respond ASAP !&lt;/p&gt;

&lt;p&gt;See you later 👋&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Deploy your Node.js app in matter of minutes using AWS Elastic Beanstalk</title>
      <dc:creator>Amr</dc:creator>
      <pubDate>Sun, 02 Jul 2023 09:49:03 +0000</pubDate>
      <link>https://dev.to/amrkamal/deploy-your-nodejs-app-in-matter-of-minutes-using-aws-elastic-beanstalk-4f7p</link>
      <guid>https://dev.to/amrkamal/deploy-your-nodejs-app-in-matter-of-minutes-using-aws-elastic-beanstalk-4f7p</guid>
      <description>&lt;p&gt;Have you ever wanted to deploy your app without so much hassle and have AWS manage everything for you and save your precious time? 🤔&lt;/p&gt;

&lt;p&gt;then you probably would want to check out this tutorial on how to benefit from &lt;strong&gt;AWS Elastic Beanstalk&lt;/strong&gt; which will handle the deployment, from capacity provisioning, load balancing, and automatic scaling to web application health monitoring, with ongoing fully managed patch and security updates.&lt;/p&gt;

&lt;p&gt;In this tutorial we will be deploying a Node.js app but AWS Elastic Beanstalk supports many other platforms which are Java, .NET, PHP, Python, Ruby, Go, and Docker.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;AWS Account, if you don't have one yet, you can create a new AWS account, go to &lt;a href="https://aws.amazon.com/"&gt;aws.amazon.com&lt;/a&gt; and choose &lt;a href="https://portal.aws.amazon.com/billing/signup?nc2=h_ct&amp;amp;src=header_signup&amp;amp;redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start"&gt;Create an AWS Account&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Node.js app and ensure your &lt;code&gt;package.json&lt;/code&gt; file has the &lt;code&gt;start command&lt;/code&gt; and this start command should be configured to run your app, Beanstalk will execute npm start by default and it throws an error if it can't find it, if you don't have your own app to follow along in this tutorial, you can use this &lt;a href="https://download.wetransfer.com/eugv/46bb9399900a97dafcdc52cd50e6acf520230702074937/11e1d703c6c4e72fb2c1ebcb27a24cd00a66f6af/nodejs.zip?cf=y&amp;amp;token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImRlZmF1bHQifQ.eyJleHAiOjE2ODgyODQ4MTEsImlhdCI6MTY4ODI4NDIxMSwiZG93bmxvYWRfaWQiOiJhMjFhNWQwMC03MzY5LTRlNDEtYjRkNy02NmNiZGQ5MmQ0MjUiLCJzdG9yYWdlX3NlcnZpY2UiOiJzdG9ybSJ9.Bv9vEOQjmub0dSJIm7ANH-0EJq-RJLnk2TLMPYCsWH0"&gt;sample app&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Login in your AWS Account and go to your AWS Management Console from &lt;a href="https://aws.amazon.com/console/"&gt;here&lt;/a&gt; .&lt;/li&gt;
&lt;li&gt;Navigate to AWS Elastic Beanstalk service inside your AWS management console search bar.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y-CJ3Zyn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/guj9hni25phjjni7jmc0.png" alt="AWS Beanstalk in search bar" width="800" height="285"&gt;
&lt;/li&gt;
&lt;li&gt;Click on Create Application.&lt;/li&gt;
&lt;li&gt;Choose your Application name and choose the correct platform which in our case will be Node.js &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9HHdJ77n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/se542trces6fpgl2kz70.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9HHdJ77n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/se542trces6fpgl2kz70.png" alt="Choose app name and platform" width="800" height="868"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose to upload your own local code and type a version label for it then choose which instances preset you need for your app, in this tutorial we will go with a single instance (Free tier)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gSygkt5g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bvfkzas5doxbu6r5px3d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gSygkt5g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bvfkzas5doxbu6r5px3d.png" alt="upload your code" width="666" height="709"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Configure service access, select Create and use new service role. It'll automatically create and provide required permissions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To access your EC2 instance through the terminal using SSH, you should generate a key-value pair and choose it. However, if you don't need to log in to EC2, you may skip this step.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Next, you should create an IAM role with the required permissions: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;AWSElasticBeanstalkWebTier&lt;br&gt;
AWSElasticBeanstalkWorkerTier&lt;br&gt;
AWSElasticBeanstalkMulticontainerDocker&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assign the role to the "EC2 instance profile" and then move on to the following step.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure your network, Select your VPC then for instance settings Activate Public IP Address if you want to SSH into the instance and then choose a subnet in the availability zone you need, for the database settings you can skip it since you don't need to configure the database for this sample app but if your app needs it you can simply enable the database settings and fill in the database info.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tZz1SOau--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rfuoe3f0gn9vx22x78xc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tZz1SOau--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rfuoe3f0gn9vx22x78xc.png" alt="Network Settings" width="800" height="596"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure your storage and scaling, select your desired root volume type, you can keep it on the container storage default since it's the most optimal option, then choose your needed security group for the instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sUcLV_Nd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zeaumllkpkmurf9i80zo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sUcLV_Nd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zeaumllkpkmurf9i80zo.png" alt="storage and scaling" width="800" height="743"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure Auto scaling group, for this tutorial we chose single instance to just showcase a sample app deployment but in production you would probably need to enable load balancing and fill in the information based on your needs.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Step 5&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure updates, monitoring, and logging, you can leave this with the default options enabled or adjust the settings depending on your needs.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Step 6&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Review your Application settings before deployment and when you are done you can just go ahead and click on submit.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Now just wait  till your application is deployed 😎 which will approximately take about 5 minutes.&lt;/p&gt;

&lt;p&gt;Good job 🎉 👏 for following along and reaching the end of the tutorial now  you can click on the domain link provided by Elastic Beanstalk to see your sample node.js app running.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ucpOTvsU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fmxtdid0ky627g3vjs92.png" alt="app link" width="800" height="132"&gt;
&lt;/h2&gt;




&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kJwSnCKp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78cv33hu3qr8ugukxlsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kJwSnCKp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78cv33hu3qr8ugukxlsn.png" alt="node app" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BONUS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🕵️‍♂️ Would you like to know what actually happened behind the scenes in AWS Elastic Beanstalk to deploy your app?  &lt;/p&gt;

&lt;p&gt;Well it's pretty simple, AWS creates a CloudFormation stack to deploy your application with the configuration you provided in the previous steps which is pretty cool since you can see exactly how everything got deployed and even re-use that stack and adjust your own configuration on the fly!&lt;/p&gt;

&lt;p&gt;That's a wrap for the tutorial, thank you for taking your time to check it out and I hope you found it helpful and if you ever have any questions or feedback you can write it down in the comments.&lt;/p&gt;

&lt;p&gt;See you later in another tutorial ! 👋&lt;/p&gt;

</description>
      <category>aws</category>
      <category>beanstalk</category>
      <category>node</category>
    </item>
  </channel>
</rss>
