<?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: Ritul Singh</title>
    <description>The latest articles on DEV Community by Ritul Singh (@ritulsingh).</description>
    <link>https://dev.to/ritulsingh</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%2F467732%2Fab6d25c6-cd8a-4dee-95ae-beb27327eac0.jpg</url>
      <title>DEV Community: Ritul Singh</title>
      <link>https://dev.to/ritulsingh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ritulsingh"/>
    <language>en</language>
    <item>
      <title>Schedule Events in EventBridge with Lambda</title>
      <dc:creator>Ritul Singh</dc:creator>
      <pubDate>Wed, 18 Dec 2024 10:23:20 +0000</pubDate>
      <link>https://dev.to/ritulsingh/schedule-events-in-eventbridge-with-lambda-4gne</link>
      <guid>https://dev.to/ritulsingh/schedule-events-in-eventbridge-with-lambda-4gne</guid>
      <description>&lt;p&gt;In this blog post, we'll explore how to schedule events using AWS EventBridge Scheduler and AWS Lambda. This method is efficient and scalable, ensuring your application can handle multiple scheduled events without creating a mess of individual EventBridge rules. Let's dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is AWS EventBridge?
&lt;/h2&gt;

&lt;p&gt;AWS EventBridge is a serverless event bus service that makes it easy to connect applications using data from your own applications, integrated Software-as-a-Service (SaaS) applications, and AWS services. EventBridge delivers a stream of real-time data from event sources and routes that data to targets like AWS Lambda, Amazon SNS, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is AWS Lambda?
&lt;/h2&gt;

&lt;p&gt;AWS Lambda is a serverless compute service that lets you run code without provisioning or managing servers. You can trigger Lambda functions directly from other AWS services, such as S3, DynamoDB, or EventBridge, and scale automatically from a few requests per day to thousands per second.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we start, make sure you have the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An AWS account&lt;/li&gt;
&lt;li&gt;Basic knowledge of Node.js&lt;/li&gt;
&lt;li&gt;AWS CLI configured on your machine&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 1: Setting Up Your AWS Environment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Creating an IAM Role
&lt;/h3&gt;

&lt;p&gt;Firstly, we need to create an IAM role that will allow AWS EventBridge Scheduler to invoke your Lambda function.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Go to the IAM Console&lt;/strong&gt;: Navigate to the &lt;a href="https://console.aws.amazon.com/iam/" rel="noopener noreferrer"&gt;IAM console&lt;/a&gt;, choose &lt;strong&gt;Roles&lt;/strong&gt; from the left navigation pane, and click &lt;strong&gt;Create role&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Select Trusted Entity&lt;/strong&gt;: Choose &lt;strong&gt;AWS service&lt;/strong&gt;, select &lt;strong&gt;Lambda&lt;/strong&gt;, and click &lt;strong&gt;Next: Permissions&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Attach Policies&lt;/strong&gt;: Attach the following managed policies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWSLambdaBasicExecutionRole&lt;/strong&gt;: Provides basic Lambda execution permissions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AmazonEventBridgeSchedulerFullAccess&lt;/strong&gt;: Allows EventBridge Scheduler to manage schedules.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review and Create&lt;/strong&gt;: Provide a name for the role, e.g., &lt;code&gt;LambdaExecutionRole&lt;/code&gt;, review the settings, and click &lt;strong&gt;Create role&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Update Trust Relationship&lt;/strong&gt;: After the role is created, go to the role details page. Under the &lt;strong&gt;Trust relationships&lt;/strong&gt; tab, click &lt;strong&gt;Edit trust relationship&lt;/strong&gt;. Update the trust policy to include &lt;code&gt;scheduler.amazonaws.com&lt;/code&gt; service:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"Principal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
           &lt;/span&gt;&lt;span class="nl"&gt;"Service"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"lambda.amazonaws.com"&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sts:AssumeRole"&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"Principal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
           &lt;/span&gt;&lt;span class="nl"&gt;"Service"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"scheduler.amazonaws.com"&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sts:AssumeRole"&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Creating the Lambda Function
&lt;/h2&gt;

&lt;p&gt;We'll create a Lambda function that will process the scheduled events.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Go to the Lambda Console&lt;/strong&gt;: Navigate to the &lt;a href="https://console.aws.amazon.com/lambda/" rel="noopener noreferrer"&gt;Lambda console&lt;/a&gt;, click &lt;strong&gt;Create function&lt;/strong&gt;, and choose &lt;strong&gt;Author from scratch&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configure the Lambda Function&lt;/strong&gt;: Set the function name to &lt;code&gt;processScheduledEvent&lt;/code&gt;, select &lt;code&gt;Node.js 16.x&lt;/code&gt; as the runtime, and use the existing role you created earlier (&lt;code&gt;LambdaExecutionRole&lt;/code&gt;). Click &lt;strong&gt;Create function&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add Function Code&lt;/strong&gt;: Replace the default code with your logic to process the event. For instance, you might log the event details or perform specific actions based on the event data:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;   &lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;eventDetails&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

     &lt;span class="c1"&gt;// Your logic to process the event&lt;/span&gt;
     &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Processing scheduled event:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;eventDetails&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

     &lt;span class="c1"&gt;// Example: Process event&lt;/span&gt;
     &lt;span class="c1"&gt;// processEvent(eventDetails);&lt;/span&gt;

     &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="na"&gt;statusCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Event processed successfully&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
     &lt;span class="p"&gt;};&lt;/span&gt;
   &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deploy the Function&lt;/strong&gt;: Click &lt;strong&gt;Deploy&lt;/strong&gt; to save the changes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 3: Scheduling the Event
&lt;/h2&gt;

&lt;p&gt;Now, let's write the code to schedule an event using AWS EventBridge Scheduler.&lt;/p&gt;

&lt;p&gt;First, install the necessary AWS SDK modules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @aws-sdk/client-scheduler @aws-sdk/client-lambda
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s a summary of the steps to implement the scheduling function:&lt;/p&gt;

&lt;h3&gt;
  
  
  Extract Event Details
&lt;/h3&gt;

&lt;p&gt;Extract the event details from your application's input. Here is an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;eventDetails&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;TEST-EVENT-01&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;USER123&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;eventId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;EVENT-001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;eventTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2024-12-17T18:05:00+05:30&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;// IST time in ISO format&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Convert IST to UTC
&lt;/h3&gt;

&lt;p&gt;Convert the scheduled time from IST (Indian Standard Time) to UTC (Coordinated Universal Time).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;istTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;eventDetails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;eventTime&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// IST time&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;utcTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;istTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;5.5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Convert to UTC&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Format the UTC Time String
&lt;/h3&gt;

&lt;p&gt;Ensure the UTC time string is in the correct format required by EventBridge Scheduler (&lt;code&gt;yyyy-MM-ddTHH:mm:ssZ&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;utcString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;utcTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Z&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create an EventBridge Schedule
&lt;/h3&gt;

&lt;p&gt;Create an EventBridge schedule using the AWS SDK, specifying the Lambda function ARN as the target and including the event details as input.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SchedulerClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;CreateScheduleCommand&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@aws-sdk/client-scheduler&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;schedulerClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SchedulerClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;region&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;your-region&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createScheduleEventRequest&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scheduleParams&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`schedule_event_&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;eventDetails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;eventId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;ScheduleExpression&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`at(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;utcString&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;Target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;Arn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;arn:aws:lambda:your-region:your-account-id:function:processScheduledEvent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Replace with your Lambda function ARN&lt;/span&gt;
        &lt;span class="na"&gt;RoleArn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;arn:aws:iam::your-account-id:role/LambdaExecutionRole&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Replace with your Role ARN&lt;/span&gt;
        &lt;span class="na"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;eventDetails&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;FlexibleTimeWindow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;Mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;OFF&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;State&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ENABLED&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scheduleResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;schedulerClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CreateScheduleCommand&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scheduleParams&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;EventBridge schedule created:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;scheduleResult&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Scheduled event created successfully&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Error creating scheduled event:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Failed to create scheduled event&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createScheduleEventRequest&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this blog post, we walked through the process of setting up a scheduled event using AWS EventBridge Scheduler and Lambda. This approach ensures that our application can handle multiple scheduled events efficiently and scalably. With the power of AWS, you can build robust features that enhance user experience and streamline operations.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>aws</category>
      <category>lambda</category>
      <category>eventdriven</category>
    </item>
    <item>
      <title>Know About HTTP Response Status Codes</title>
      <dc:creator>Ritul Singh</dc:creator>
      <pubDate>Sat, 31 Dec 2022 10:31:45 +0000</pubDate>
      <link>https://dev.to/ritulsingh/everything-you-need-to-know-about-http-response-status-codes-1ica</link>
      <guid>https://dev.to/ritulsingh/everything-you-need-to-know-about-http-response-status-codes-1ica</guid>
      <description>&lt;p&gt;HTTP response status codes are 3-digit numbers that are used to indicate the status of a request made to a web server. They are returned by the server in response to an HTTP request and provide information about the result of the request.&lt;/p&gt;

&lt;p&gt;Here are some common HTTP response status codes and their meanings:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;200 OK:&lt;/strong&gt; This status code indicates that the request was successful and the requested resource was returned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;301 Moved Permanently:&lt;/strong&gt; This status code indicates that the requested resource has been permanently moved to a new URL. The server returns this code along with the new URL in the response header.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;302 Found:&lt;/strong&gt; This status code indicates that the requested resource has been temporarily moved to a new URL. The server returns this code along with the new URL in the response header.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;404 Not Found:&lt;/strong&gt; This status code indicates that the server could not find the requested resource.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;500 Internal Server Error:&lt;/strong&gt; This status code indicates that there was an error on the server while processing the request.&lt;/p&gt;

&lt;p&gt;There are many other HTTP response status codes, each with its own specific meaning. Some of these codes are used more commonly than others, but it's important to be aware of all of them to understand the full range of responses that a server can send.&lt;/p&gt;

&lt;p&gt;In addition to the standard HTTP response status codes, some servers may also return custom status codes to provide more information about the result of a request. These custom codes should be used in conjunction with the standard status codes to provide a complete picture of the request's outcome.&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>My First Hacktoberfest — Experiences of Contributing to Open Source</title>
      <dc:creator>Ritul Singh</dc:creator>
      <pubDate>Tue, 03 Nov 2020 17:18:18 +0000</pubDate>
      <link>https://dev.to/ritulsingh/my-first-hacktoberfest-experiences-of-contributing-to-open-source-3hfi</link>
      <guid>https://dev.to/ritulsingh/my-first-hacktoberfest-experiences-of-contributing-to-open-source-3hfi</guid>
      <description>&lt;p&gt;Contributing to Open Source and projects can seem like a daunting process. Your favorite search engine will return a ton of results on guides and repositories to get started. But many times, your search does not yield the result you want, you still do not know how to contribute to Open Source even after reading multiple blog posts. The impeding reputation of certain projects and a harsh undertone does not help either and might complicate matters even further.&lt;/p&gt;

&lt;p&gt;I have been there myself. I trawled through pages to find great Open Source repositories to contribute to, only to notice that I did not know how to start.&lt;/p&gt;

&lt;p&gt;Frustrated and a little disappointed, I started focusing on other projects instead.&lt;/p&gt;

&lt;p&gt;But it all changed when I saw a fellow employee’s Hacktoberfest sticker on their laptop. I was intrigued — was this a remnant of yet another Hackathon?&lt;/p&gt;

&lt;p&gt;Hacktoberfest turned out to be very different.&lt;/p&gt;

&lt;h3&gt;
  
  
  So what is a Hacktoberfest exactly?
&lt;/h3&gt;

&lt;p&gt;Hint: it doesn’t have to do with either beer or hacking or the Oktoberfest (which actually takes place in September, duh!).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hacktoberfest.digitalocean.com/"&gt;Hacktoberfest&lt;/a&gt; is a month-long celebration of contributing to Open Source, running from 1st October to 31st October. It was initiated by DigitalOcean in collaboration with GitHub. During the month of October, you are encouraged to contribute and make pull requests to your favorite repositories on GitHub. If you manage to make four in total, you are eligible to receive a swanky T-Shirt.&lt;/p&gt;

&lt;h3&gt;
  
  
  What can we take away from this?
&lt;/h3&gt;

&lt;p&gt;I would advise you to free yourself from the assumption, that you need to contribute perfect and well-rounded code the first time. Your first contribution does not have to be ground-breaking (or even be code to be precise).&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;If you have the experience of contributing to open source, please share it in the comments. &lt;strong&gt;Happy Coding!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>opensource</category>
    </item>
    <item>
      <title>My Top 10 Visual Studio Code Extensions for Python in 2020</title>
      <dc:creator>Ritul Singh</dc:creator>
      <pubDate>Fri, 30 Oct 2020 09:50:45 +0000</pubDate>
      <link>https://dev.to/ritulsingh/my-top-10-visual-studio-code-extensions-for-python-in-2020-l3g</link>
      <guid>https://dev.to/ritulsingh/my-top-10-visual-studio-code-extensions-for-python-in-2020-l3g</guid>
      <description>&lt;h3&gt;
  
  
  1.&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-python.python" rel="noopener noreferrer"&gt;Python&lt;/a&gt; extension for Visual Studio Code
&lt;/h3&gt;

&lt;p&gt;by Microsoft&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffntzqqste8brzeubtl15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffntzqqste8brzeubtl15.png" alt="Python"&gt;&lt;/a&gt;&lt;br&gt;
First and foremost - the Python plugin for VS Code. Out of the box, there is no support for Python in the VS Code, but when you open a Python file, VS Code will immediately suggest this plugin. It adds all the necessary features like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Syntax highlighting for Python files&lt;/li&gt;
&lt;li&gt;Intellisense (code-completion suggestions)&lt;/li&gt;
&lt;li&gt;Ability to start a debugger&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. &lt;a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer" rel="noopener noreferrer"&gt;Bracket Pair Colorizer&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;by CoenraadS&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs70jgg3rxcb87a368y4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs70jgg3rxcb87a368y4p.png" alt="Bracket Pair Colorizer"&gt;&lt;/a&gt;&lt;br&gt;
This extension allows matching brackets to be identified with colors. The user can define which tokens to match, and which colors to use.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;a href="https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments" rel="noopener noreferrer"&gt;Better Comments&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;by Aaron Bond&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvgl4qqeypa4wmw1quc6q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvgl4qqeypa4wmw1quc6q.png" alt="Better Comments"&gt;&lt;/a&gt;&lt;br&gt;
The Better Comments extension will help you create more human-friendly comments in your code.&lt;br&gt;
With this extension, you will be able to categorize your annotations into, Alerts, Queries, TODOs.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;a href="https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens" rel="noopener noreferrer"&gt;Error Lens&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;by Alexander&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxsn7rp8zvdr5lnx0yw9h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxsn7rp8zvdr5lnx0yw9h.png" alt="Error Lens"&gt;&lt;/a&gt;&lt;br&gt;
Sometimes the error marks in VS Code are hard to spot (especially the “info” hints). If you don’t wrap lines, it’s even worse - the error can be in the part of the code not visible on the screen.&lt;br&gt;
That’s why I’m using Error Lens. It lets me modify how the errors should be displayed. It can display the error message next to the line where it occurs and a Sublime-like error icon in the gutter (next to the line number)&lt;/p&gt;

&lt;h3&gt;
  
  
  5. &lt;a href="https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph" rel="noopener noreferrer"&gt;Git Graph&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;by Mhutchie&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5p4j2q870qqy0g66rdu1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5p4j2q870qqy0g66rdu1.png" alt="Git Graph"&gt;&lt;/a&gt;&lt;br&gt;
If your working with code I assume you use a repository to safely store it. Git graph adds another dimension to the way you use the VS Code. It adds a nice user interface of your Git history and adds the ability to create/checkout new branches with the click of a button.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. &lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens" rel="noopener noreferrer"&gt;GitLens&lt;/a&gt; Git supercharged
&lt;/h3&gt;

&lt;p&gt;by Eric Amodio&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpve61jqm58p10t5u5hql.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpve61jqm58p10t5u5hql.png" alt="GitLens"&gt;&lt;/a&gt;&lt;br&gt;
This extension has at the time of writing already has more than 5 million downloads! This extension is not only a game-changer it makes sure you use Git in other ways you normally wouldn’t have used it within your CLI.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. &lt;a href="https://marketplace.visualstudio.com/items?itemName=dongli.python-preview" rel="noopener noreferrer"&gt;Python Preview&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;by Dongli&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjmxr9vzdulxvwlc5slb3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjmxr9vzdulxvwlc5slb3.png" alt="Python"&gt;&lt;/a&gt;&lt;br&gt;
This extension is really simple but extremely handy. It brings a visual view to VSCode for Python, which makes debugging code far simpler and likely quite a bit faster.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. &lt;a href="https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks" rel="noopener noreferrer"&gt;Bookmarks&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;by Alessandro Fragnani&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F807me7a26j6h0zrs5coj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F807me7a26j6h0zrs5coj.png" alt="Bookmarks"&gt;&lt;/a&gt;&lt;br&gt;
This extension lets you bookmark locations in your code, easily list all your bookmarks in a sidebar, and move between them with keyboard shortcuts.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. &lt;a href="https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight" rel="noopener noreferrer"&gt;TODO Highlight&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;by Wayou Liu&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feascqizymtp4cc7be7s0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feascqizymtp4cc7be7s0.png" alt="TODO Highlight"&gt;&lt;/a&gt;&lt;br&gt;
Highlights all TODO/FIXME/NOTE in the code, so you can easily spot them. You can easily customize it by adding new words and changing the highlight style.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. &lt;a href="https://marketplace.visualstudio.com/items?itemName=KevinRose.vsc-python-indent" rel="noopener noreferrer"&gt;Python Indent&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;by Kevin Rose&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu9p9diy05nydlkvmthgy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu9p9diy05nydlkvmthgy.png" alt="Python Indent"&gt;&lt;/a&gt;&lt;br&gt;
Every time you press the Enter key in a python context, this extension will parse your python file up to the location of your cursor, and determine exactly how much the next line (or two in the case of hanging indents) should be indented and how much nearby lines should be un-indented.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;These are my top extensions for python that I am using in 2020, there are of-course more extensions that I am using (Django-snippets, Flask-snippets) but I wanted to focus on the extensions that I am using for python only. If you have an extension that is not included in this list, please share it in the comments. &lt;strong&gt;Happy Coding!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>python</category>
      <category>vsextension</category>
      <category>writingpython</category>
    </item>
    <item>
      <title>How to Open File Explorer Using Command Prompt on Windows 10</title>
      <dc:creator>Ritul Singh</dc:creator>
      <pubDate>Thu, 22 Oct 2020 17:30:30 +0000</pubDate>
      <link>https://dev.to/ritulsingh/how-to-open-file-explorer-using-command-prompt-on-windows-10-1mg2</link>
      <guid>https://dev.to/ritulsingh/how-to-open-file-explorer-using-command-prompt-on-windows-10-1mg2</guid>
      <description>&lt;p&gt;While there are quicker ways to open File Explorer, you can use Command Prompt to open the file manager in the current directory (or any other directory) in Windows 10. Here’s how.&lt;/p&gt;

&lt;h3&gt;
  
  
  Open File Explorer Using Command Prompt
&lt;/h3&gt;

&lt;p&gt;To begin with, open Command Prompt on your PC by opening the "Start" menu, composing "cmd" in the Windows Search bar, at that point choosing "Order Prompt" from the list items.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5px8c6x130fbgswgmwda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5px8c6x130fbgswgmwda.png" alt="CMD"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Command Prompt will now open. Here, run the following command to open the File Explorer:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1tl8vu5x48daq6kvl7nv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1tl8vu5x48daq6kvl7nv.png" alt="cmd"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;.&lt;/strong&gt; in the command represents the current directory in the command prompt. This command will open the folder in File Explorer that reflects that directory.&lt;br&gt;
To open the parent folder of the current directory, run this command instead:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;start ..&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftyr4vn7fdlsuwvgjq7fx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftyr4vn7fdlsuwvgjq7fx.png" alt="CMD"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The parent folder of the current directory will now open in File Explorer.&lt;/p&gt;

&lt;p&gt;You can keep going back in the directory by appending a backslash and two periods. For example, we’re currently in the “C Program” folder in Command Prompt. Running start .... will open the “D drive” folder in File Explorer—a folder two levels up from the current directory in Command Prompt.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpc3us4ei84950sxtob3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpc3us4ei84950sxtob3p.png" alt="cmd"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Open a Specific Folder in File Explorer Using Command Prompt
&lt;/h3&gt;

&lt;p&gt;You can change directories in Command Prompt by using the cd command and running the start . command once in the desired directory to open that folder in File Explorer. However, you can also open any folder in File Explorer by running the start command, followed by the path of the folder you’d like to open.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example&lt;/strong&gt;, in our current directory, C:\Users\Ritul Singh, we want to open the Documents folder in File Explorer, which is just one level down. To do so, we’d run the following command:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;start Documents&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fppr171zwhmjwb1dnbjbq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fppr171zwhmjwb1dnbjbq.png" alt="cmd"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cmd</category>
      <category>windows10</category>
      <category>fileexplorer</category>
      <category>commandprompt</category>
    </item>
  </channel>
</rss>
