<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by sanjeet Kumar on Medium]]></title>
        <description><![CDATA[Stories by sanjeet Kumar on Medium]]></description>
        <link>https://medium.com/@sanjeetkr.11?source=rss-209019e3446d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*u09boeELDTynWE7O</url>
            <title>Stories by sanjeet Kumar on Medium</title>
            <link>https://medium.com/@sanjeetkr.11?source=rss-209019e3446d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 08:55:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanjeetkr.11/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I Built an AI-Powered Image Recognizer That Can ‘See’ Like a Human ]]></title>
            <link>https://medium.com/@sanjeetkr.11/how-i-built-an-ai-powered-image-recognizer-that-can-see-like-a-human-ed8e95c56406?source=rss-209019e3446d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed8e95c56406</guid>
            <dc:creator><![CDATA[sanjeet Kumar]]></dc:creator>
            <pubDate>Fri, 03 Oct 2025 08:11:51 GMT</pubDate>
            <atom:updated>2025-10-03T08:11:51.880Z</atom:updated>
            <content:encoded><![CDATA[<p>Artificial Intelligence is no longer just a buzzword — it’s powering the apps we use every day. From <strong>Google Photos automatically organizing your pictures</strong> to <strong>Pinterest recommending visually similar pins</strong>, AI-driven computer vision has quietly become part of our daily lives.</p><p>Curious about how this actually works, I decided to roll up my sleeves and build my own <strong>AI-powered image recognizer</strong> using <strong>Amazon Rekognition</strong>. The idea was simple:</p><p>👉 Upload an image → let AI analyze it → get back a list of objects, scenes, and even human actions it detects.</p><p>For example, if you upload a photo of a cricketer batting 🏏, the AI can identify “Person,” detect poses, and even label objects like a bat, helmet, or stadium in the background.</p><p>In this article, I’ll walk you through the exact steps I took — from setting up an S3 bucket to running Python code that highlights objects in an image — so you can build your own AI-powered image recognizer too.</p><p>Let’s dive in. 👇</p><h3>Steps to be performed</h3><p>We’ll be going through the following steps.</p><ol><li>Creating and Uploading images to the S3 Bucket</li><li>Setting up CLI</li><li>Importing libraries</li><li>Adding detect_labels function</li><li>Adding main function</li><li>Running your python file</li></ol><h3>Services Used 🛠</h3><ul><li>Amazon S3: For storing the images in the process of generating labels.</li><li>Amazon Rekognition: To analyse images and generate image labels.</li><li>AWS CLI: Interacting with AWS services through command line interface(CLI).</li></ul><h3>➡️ Architectural Diagram</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*9RWjGKMD9t84z3W8QnX0gA.png" /></figure><h3>Step 1: Setting Up Bucket Creation and Storage with Amazon S3</h3><p>Before we can analyze images, we need a place to store them. I created an <strong>Amazon S3 bucket</strong>, which securely stores images for processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3JQQRceSAHOlKDfa.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*1y5eKuKnuR9XctW92MryTw.png" /></figure><h3>Step 2: Connecting with AWS CLI &amp; Python</h3><p>The <strong>AWS CLI</strong> allows seamless communication with AWS services. Once installed and configured, Python can interact with Amazon Rekognition for image analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*Ml76WWcPr4RvsEDagJn5zQ.png" /></figure><h3>Step 3: Importing Libraries</h3><p>Let’s import the necessary libraries. We need:</p><ol><li><strong>boto3</strong> for interacting with AWS services.</li><li><strong>matplotlib</strong> for visualization.</li><li><strong>PIL (Python Imaging Library)</strong> for handling image data.</li><li><strong>BytesIO</strong> from the io module to work with image data.</li></ol><pre>import boto3<br>import matplotlib.pyplot as plt<br>import matplotlib.patches as patches<br>from PIL import Image<br>from io import BytesIO</pre><h3>Step 4: detect_labels function</h3><p>Now, we are defining a function called <strong>detect_labels</strong> that can look at a photo and tell us what objects are in it. Here’s what it does step by step:</p><ol><li><strong>Connect to AWS Rekognition</strong> — We use <strong>boto3</strong> to create a client so we can ask AWS to look at the image.</li><li><strong>Find objects in the photo</strong> — We use <strong>Rekognition</strong> to detect labels (like “bat”, “person”) in the image.</li><li><strong>Show what Rekognition found</strong> — We print the labels and how confident the system is about each one.</li><li><strong>Load the image</strong> — We get the photo from the S3 bucket and open it using <strong>PIL</strong>.</li><li><strong>Draw on the image</strong> — We use <strong>matplotlib</strong> to display the photo and draw boxes around the objects Rekognition found.</li></ol><p><strong>In short:</strong> it looks at a photo, tells you what’s in it, and shows the photo with boxes around the objects.</p><p>Note: Remember to change your ‘<em>region_name</em>’.</p><pre>def detect_labels(photo, bucket):<br>    # Create a Rekognition client<br>    client = boto3.client(&#39;rekognition&#39;, region_name=&#39;your-region-name&#39;)<br><br>    # Detect labels in the photo<br>    response = client.detect_labels(<br>        Image={&#39;S3Object&#39;: {&#39;Bucket&#39;: bucket, &#39;Name&#39;: photo}},<br>        MaxLabels=10)<br><br>    # Print detected labels<br>    print(&#39;Detected labels for &#39; + photo)<br>    print()<br>    for label in response[&#39;Labels&#39;]:<br>        print(&quot;Label:&quot;, label[&#39;Name&#39;])<br>        print(&quot;Confidence:&quot;, label[&#39;Confidence&#39;])<br>        print()<br><br>    # Load the image from S3<br>    s3 = boto3.resource(&#39;s3&#39;, region_name=&#39;your-region-name&#39;)<br>    obj = s3.Object(bucket, photo)<br>    img_data = obj.get()[&#39;Body&#39;].read()<br>    img = Image.open(BytesIO(img_data))<br><br>    # Display the image with bounding boxes<br>    plt.imshow(img)<br>    ax = plt.gca()<br>    for label in response[&#39;Labels&#39;]:<br>        for instance in label.get(&#39;Instances&#39;, []):<br>            bbox = instance[&#39;BoundingBox&#39;]<br>            left = bbox[&#39;Left&#39;] * img.width<br>            top = bbox[&#39;Top&#39;] * img.height<br>            width = bbox[&#39;Width&#39;] * img.width<br>            height = bbox[&#39;Height&#39;] * img.height<br>            rect = patches.Rectangle((left, top), width, height, linewidth=1, edgecolor=&#39;r&#39;, facecolor=&#39;none&#39;)<br>            ax.add_patch(rect)<br>            label_text = label[&#39;Name&#39;] + &#39; (&#39; + str(round(label[&#39;Confidence&#39;], 2)) + &#39;%)&#39;<br>            plt.text(left, top - 2, label_text, color=&#39;r&#39;, fontsize=8, bbox=dict(facecolor=&#39;white&#39;, alpha=0.7))<br>    plt.show()<br><br>    return len(response[&#39;Labels&#39;])</pre><h3>Step 5: Adding main function</h3><p>Now, we write main function to test our <strong>detect_labels</strong> function. We specify the sample photo and bucket name that we created earlier, then call the detect_labels function with these parameters.<br>Note: Remember to change your ‘<em>image_file_name</em>’ and ‘<em>bucket_name</em>’ to your actual configured naming.</p><pre>def main():<br>    photo = &#39;your-image-file&#39;<br>    bucket = &#39;your-bucket-name&#39;<br>    label_count = detect_labels(photo, bucket)<br>    print(&quot;Labels detected:&quot;, label_count)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><h3>Step 6: Running python file</h3><p>Open the terminal in the directory where your Python file is present and run the command:</p><p>python name_of_python_file.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k4Iw2Z7xBAJZxoVNEI6GYg.png" /></figure><p>A pop-up screen will appear displaying the uploaded image with labels. The screenshot above shows the image before and after running the file.</p><h3>What I Learned</h3><p>This project showed me that building with AI doesn’t have to be intimidating. Services like <strong>AWS Rekognition</strong> make it easy to plug advanced computer vision into your apps without needing a PhD in machine learning.</p><h3>Your Turn 💡</h3><p>If you’ve ever wanted to try AI, this is a perfect beginner-friendly project. All you need is:</p><ul><li>An AWS account</li><li>A couple of images</li><li>A bit of curiosity</li></ul><p>👉 Give it a shot, and let me know how it goes! Drop a comment with your own AI project ideas — I’d love to hear about them.</p><p>And if you enjoyed this breakdown, hit <strong>Follow</strong> to join me as I share more hands-on AI experiments and tutorials. Let’s learn and build together! 🚀</p><p><strong>#ArtificalIntelligence #AWS #CloudComputing #MachineLearning #Python</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed8e95c56406" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Building a Serverless Event Announcement Platform with AWS]]></title>
            <link>https://medium.com/@sanjeetkr.11/building-a-serverless-event-announcement-platform-with-aws-8993e255076e?source=rss-209019e3446d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8993e255076e</guid>
            <dc:creator><![CDATA[sanjeet Kumar]]></dc:creator>
            <pubDate>Thu, 25 Sep 2025 08:55:14 GMT</pubDate>
            <atom:updated>2025-09-25T08:55:14.605Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wanted to quickly set up a platform where users can subscribe to events, get notified via email, and even submit new events — without worrying about servers? That’s exactly what we’ll build today using AWS’s serverless stack.</p><p>By the end of this guide, you’ll have:</p><ul><li>A <strong>static website</strong> hosted on S3</li><li><strong>Event subscription</strong> via email using SNS</li><li><strong>Event creation</strong> powered by API Gateway + Lambda</li><li>Automated <strong>notifications</strong> sent to all subscribers</li></ul><p>Let’s dive in.</p><h3>🔹 1. Project Overview</h3><p>We’ll create a simple <strong>serverless event announcement platform</strong>. Here’s what it does:</p><ul><li>Users can <strong>subscribe</strong> to event notifications with their email.</li><li>Everyone can <strong>view the list of events</strong> from a static site.</li><li>Specific users can <strong>create events</strong> via a form.</li><li>When a new event is added, all subscribers get an email alert.</li></ul><h3>AWS Services Used</h3><ul><li><strong>Amazon S3</strong> → static website hosting (index.html, style.css, events.json)</li><li><strong>Amazon SNS</strong> → manage email subscribers &amp; send notifications</li><li><strong>AWS Lambda</strong> → backend logic for subscriptions and event creation</li><li><strong>Amazon API Gateway</strong> → REST endpoints (/subscribe and /create-event)</li><li><strong>IAM</strong> → fine-grained permissions for S3 and SNS access</li></ul><h3>🔹 2. Architecture</h3><p>Here’s how everything connects:</p><p>📦 <strong>S3</strong> → hosts the static frontend (index.html, style.css, events.json)<br> ⚡ <strong>API Gateway</strong> → exposes /subscribe and /create-event endpoints<br> 🛠 <strong>Lambda Functions</strong> →</p><ul><li><em>Subscription Lambda</em> adds emails to SNS</li><li><em>Event Registration Lambda</em> updates events.json in S3 and publishes an SNS notification<br> 📧 <strong>SNS</strong> → manages subscribers and sends event announcements</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*NMMBRgrBVECd1gGBjP_IMQ.png" /></figure><h4>🔹 3. Step 1: Set Up Frontend Hosting on S3</h4><ol><li>Create an <strong>S3 bucket</strong> (enable public access for hosting).</li><li>Upload your static assets:</li></ol><ul><li>index.html → event list + subscription form</li><li>style.css → styling</li><li>events.json → stores event data</li></ul><p>3. Enable <strong>Static Website Hosting</strong> in the S3 bucket settings.</p><p>4. Note the generated <strong>website URL</strong>.</p><p>Your site is now live! 🎉</p><h4>🔹<strong> 4. Step 2: Create an SNS Topic for Notifications</strong></h4><ol><li>Go to <strong>SNS &gt; Topics &gt; Create topic</strong>.</li><li>Name it eventSubscribers.</li><li>Add an <strong>email subscription</strong> (e.g., your email for testing).</li><li>Confirm the subscription from the email AWS sends.</li></ol><p>Now you’ve got a notification channel ready.</p><h4>🔹<strong> 5. Step 3: Build Lambda Functions</strong></h4><p><strong>5.1 Subscription Lambda</strong></p><p>This Lambda adds new emails to the SNS topic when /subscribe is called.</p><pre>import json<br>import boto3<br><br>def lambda_handler(event, context):<br>    # Log the entire event to CloudWatch<br>    print(&quot;Event received:&quot;, json.dumps(event))<br><br>    if &#39;body&#39; in event:<br>      body = event[&#39;body&#39;] if isinstance(event[&#39;body&#39;], dict) else json.loads(event[&#39;body&#39;])<br>      email = body.get(&#39;email&#39;, None)<br><br>        if email:<br>            sns_client = boto3.client(&#39;sns&#39;)<br><br>            try:<br>                # Subscribe the user to the SNS topic (email subscription)<br>                response = sns_client.subscribe(<br>                    TopicArn=&#39;enter-sns-topic-ARN&#39;,  # Replace with your SNS Topic ARN<br>                    Protocol=&#39;email&#39;,<br>                    Endpoint=email<br>                )<br><br>                return {<br>                    &#39;statusCode&#39;: 200,<br>                    &#39;body&#39;: json.dumps({&#39;message&#39;: &#39;Subscription successful! Please check your email to confirm.&#39;})<br>                }<br><br>            except Exception as e:<br>                print(f&quot;Error subscribing user: {str(e)}&quot;)<br>                return {<br>                    &#39;statusCode&#39;: 500,<br>                    &#39;body&#39;: json.dumps({&#39;error&#39;: f&#39;Failed to subscribe: {str(e)}&#39;}).encode(&#39;utf-8&#39;)<br>                }<br><br>        else:<br>            return {<br>                &#39;statusCode&#39;: 400,<br>                &#39;body&#39;: json.dumps({&#39;error&#39;: &#39;Email not provided.&#39;})<br>            }<br><br>    return {<br>        &#39;statusCode&#39;: 400,<br>        &#39;body&#39;: json.dumps({&#39;error&#39;: &#39;Invalid request format.&#39;})<br>    }</pre><h4>5.2 Event Registration Lambda</h4><p>This Lambda updates events.json in S3 and sends an SNS notification.</p><pre>import json<br>import boto3<br>from botocore.exceptions import ClientError<br><br>s3 = boto3.client(&#39;s3&#39;)<br>sns = boto3.client(&#39;sns&#39;)<br><br># S3 and SNS configuration<br>bucket_name = &#39;your-bucket-name&#39;<br>events_file_key = &#39;events.json&#39;<br>sns_topic_arn = &#39;your-sns-topic-arn&#39;<br><br>def lambda_handler(event, context):<br>    try:<br>        new_event = json.loads(event[&#39;body&#39;])  # Parse event body<br><br>        # Fetch existing events<br>        response = s3.get_object(Bucket=bucket_name, Key=events_file_key)<br>        events_data = json.loads(response[&#39;Body&#39;].read().decode(&#39;utf-8&#39;))<br><br>        # Add the new event<br>        events_data.append(new_event)<br><br>        # Update events.json in S3<br>        s3.put_object(<br>            Bucket=bucket_name,<br>            Key=events_file_key,<br>            Body=json.dumps(events_data, indent=2),<br>            ContentType=&#39;application/json&#39;<br>        )<br><br>        # Send SNS notification<br>        message = f&quot;New Event: {new_event[&#39;title&#39;]} on {new_event[&#39;date&#39;]}\n{new_event[&#39;description&#39;]}&quot;<br>        sns.publish(TopicArn=sns_topic_arn, Message=message, Subject=&quot;New Event Announcement&quot;)<br><br>        return {<br>            &#39;statusCode&#39;: 200,<br>            &#39;headers&#39;: {<br>                &quot;Access-Control-Allow-Origin&quot;: &quot;*&quot;,<br>                &quot;Access-Control-Allow-Methods&quot;: &quot;OPTIONS, POST&quot;,<br>                &quot;Access-Control-Allow-Headers&quot;: &quot;Content-Type&quot;<br>            },<br>            &#39;body&#39;: json.dumps({&#39;message&#39;: &#39;Event created successfully!&#39;})<br>        }<br>    <br>    except ClientError as e:<br>        print(f&quot;Error: {e}&quot;)<br>        return {<br>            &#39;statusCode&#39;: 500,<br>            &#39;headers&#39;: {<br>                &quot;Access-Control-Allow-Origin&quot;: &quot;*&quot;,<br>                &quot;Access-Control-Allow-Methods&quot;: &quot;OPTIONS, POST&quot;,<br>                &quot;Access-Control-Allow-Headers&quot;: &quot;Content-Type&quot;<br>            },<br>            &#39;body&#39;: json.dumps({&#39;message&#39;: &#39;Error processing the event&#39;})<br>        }<br>    <br>    except Exception as e:<br>        print(f&quot;Unexpected Error: {e}&quot;)<br>        return {<br>            &#39;statusCode&#39;: 500,<br>            &#39;headers&#39;: {<br>                &quot;Access-Control-Allow-Origin&quot;: &quot;*&quot;,<br>                &quot;Access-Control-Allow-Methods&quot;: &quot;OPTIONS, POST&quot;,<br>                &quot;Access-Control-Allow-Headers&quot;: &quot;Content-Type&quot;<br>            },<br>            &#39;body&#39;: json.dumps({&#39;message&#39;: &#39;Unexpected error occurred&#39;})<br>        }</pre><h4>🔹<strong> 6. Step 4: Expose Endpoints with API Gateway</strong></h4><ol><li>Create a new <strong>API Gateway (REST API)</strong>.</li><li>Define two resources:</li></ol><ul><li>/subscribe → Subscription Lambda</li><li>/create-event → Event Registration Lambda</li></ul><p>3. Deploy the API and get the endpoint URLs.</p><h4>🔹 7. Step 5: Configure IAM Permissions</h4><p>Grant each Lambda function only the permissions it needs:</p><ul><li><strong>Subscription Lambda</strong> → sns:Subscribe</li><li><strong>Event Registration Lambda</strong> → s3:GetObject, s3:PutObject, sns:Publish</li></ul><h4>🔹<strong> 8. Step 6: Test the Workflow</strong></h4><p>✅ Visit your S3 website → subscribe with an email.<br> ✅ Confirm subscription.<br> ✅ Submit a new event via the form.<br> ✅ Check events.json updated in S3.<br> ✅ Watch your inbox for the event announcement!</p><h4>🔹<strong> 9. Key Learnings</strong></h4><ul><li><strong>Serverless = fewer headaches</strong> → no servers to manage, scale, or patch.</li><li><strong>IAM matters</strong> → minimal roles avoid security risks.</li><li><strong>SNS is simple but powerful</strong> → great for broadcasting notifications.</li></ul><h4>🔹<strong> 10. What’s Next?</strong></h4><p>This is just the foundation! You could:</p><ul><li>Add <strong>Cognito authentication</strong> for event creators</li><li>Replace events.json with <strong>DynamoDB</strong> for scalability</li><li>Use <strong>SES</strong> for branded email notifications</li></ul><h4>🔹<strong> 11. Conclusion</strong></h4><p>We’ve built a <strong>serverless event announcement platform</strong> using AWS S3, SNS, Lambda, API Gateway, and IAM. With just a few services, you now have a functional app that can scale automatically and cost almost nothing to run.</p><p>Give it a try, and share your own implementation!</p><h4>#AWS #Serverless #CloudComputing #Event-Driven Architecture</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8993e255076e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Week Exploring Cloud Fundamentals ]]></title>
            <link>https://medium.com/@sanjeetkr.11/my-first-week-exploring-cloud-fundamentals-764c8cff30ee?source=rss-209019e3446d------2</link>
            <guid isPermaLink="false">https://medium.com/p/764c8cff30ee</guid>
            <dc:creator><![CDATA[sanjeet Kumar]]></dc:creator>
            <pubDate>Wed, 10 Sep 2025 01:48:21 GMT</pubDate>
            <atom:updated>2025-09-10T01:48:21.562Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*_JCB6f39P7eT7Iu1FMsfBA.jpeg" /><figcaption>source: istockphoto.com</figcaption></figure><p>This week, I took a deep dive into the world of <strong>cloud and networking basics</strong>. I started by understanding what cloud computing really is, why it matters, and the different deployment models. Setting up my own <strong>AWS account</strong> (and securing it!) made things more hands-on.</p><p>Next, I explored how the <strong>internet and networking</strong> work — from virtualization to DNS and IPs — and practiced with small but fun projects like curl requests and trace routes.</p><p>I also touched on <strong>operating systems, databases, and cloud-specific features</strong>, wrapping up with quizzes and documentation to check my progress.</p><p>Overall, it was a <strong>solid first step into cloud fundamentals</strong>, and I’m excited to keep building on this foundation 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=764c8cff30ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>