<?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 Shamnad Shaji on Medium]]></title>
        <description><![CDATA[Stories by Shamnad Shaji on Medium]]></description>
        <link>https://medium.com/@shamnad.p.s?source=rss-2e03b6e236c6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5gOSIbzNP7y1ZaF88_lBpA.png</url>
            <title>Stories by Shamnad Shaji on Medium</title>
            <link>https://medium.com/@shamnad.p.s?source=rss-2e03b6e236c6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 19:35:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shamnad.p.s/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[Building a “Household Chief of Staff” agent]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">A weekend project for the All Things Agentic Hackathon &#x2014; Taskmaster track</p><p class="medium-feed-link"><a href="https://medium.com/@shamnad.p.s/building-a-household-chief-of-staff-agent-a566022c0baa?source=rss-2e03b6e236c6------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@shamnad.p.s/building-a-household-chief-of-staff-agent-a566022c0baa?source=rss-2e03b6e236c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a566022c0baa</guid>
            <dc:creator><![CDATA[Shamnad Shaji]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 20:09:33 GMT</pubDate>
            <atom:updated>2026-08-29T20:09:33.522Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Understanding LLMs on AWS: My First Hands-On with Amazon Bedrock]]></title>
            <link>https://medium.com/@shamnad.p.s/understanding-llms-on-aws-my-first-hands-on-with-amazon-bedrock-2e5144ff0a31?source=rss-2e03b6e236c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e5144ff0a31</guid>
            <dc:creator><![CDATA[Shamnad Shaji]]></dc:creator>
            <pubDate>Sat, 18 Oct 2025 07:57:31 GMT</pubDate>
            <atom:updated>2025-10-18T08:24:46.121Z</atom:updated>
            <content:encoded><![CDATA[<p>When I started exploring Generative AI, I was able realize that while there is a lot of hype around Large Language Models (LLMs), the real challenge is figuring out how to use them in practical and useful ways. Since I had some experience on working with AWS and recently passed the Machine Learning Engineer Associate exam, I decided to continue my AI learning path on AWS which had AWS Bedrock to start with.</p><p>This will be the first post in my series, “Learning LLMs on AWS — From Zero to AI Builder,” where I will be sharing my learning so that its applicable to anyone without LLM experience.</p><p><strong>What is Amazon Bedrock</strong>?</p><p>“Amazon Bedrock is AWS’s fully managed service for Generative AI, allowing developers to build and scale AI applications without managing infrastructure or training models from scratch”.</p><p>Instead of maintaining GPUs or large datasets, Bedrock gives you API access to top foundation models from various providers out of the box like:</p><ul><li>Amazon Titan</li><li>Anthropic Claude</li><li>Meta Llama</li><li>Cohere Command</li><li>Stability AI (image generation)</li></ul><p>You can think of Bedrock as an “AI model marketplace” within AWS, where you can choose, prompt, and integrate LLMs easily without further investigation.</p><p>🧩 <strong>Why Start with Bedrock</strong>?</p><p>When learning about LLMs, it’s easy to get lost in theory, parameters, tokenization, embeddings, how to host them and so on.</p><p>Bedrock lets us focus on how to just use the models, without worrying about how to host them.</p><p>Here’s what makes Bedrock ideal for beginners and professionals:</p><p>✅ No GPU setup or container deployment</p><p>✅ Unified API across multiple models</p><p>✅ Works seamlessly with AWS services like Lambda, S3, and SageMaker</p><p>✅ Includes guardrails for responsible AI use</p><p>In short, you can start experimenting immediately without prior knowledge .</p><p>🧭 <strong>My Learning Path — The First AWS Course</strong></p><p>I began with the Amazon Bedrock Getting Started course on AWS Skill Builder.</p><p>It’s short (about 2 hours) and gives a clear foundation for:</p><ul><li>What LLMs are</li><li>How foundation models differ</li><li>How to access Bedrock in your AWS account</li><li>How to write and test prompts</li></ul><p>Its a quick course, after completing it, I was ready and wanted to try out my first hands-on experiment.</p><p>💻<strong> Setting Up Amazon Bedrock</strong></p><p>Enable Bedrock in your region</p><ul><li>Go to the AWS Console -&gt; Amazon Bedrock</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*elN-oG-kwxTJsDHUDJrCaw.png" /></figure><p>Select Model from Model Catalog</p><ul><li>From the Model Catalog tab, just chose which model you want to access.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j050_Cc77RdHE7vf1Kosjg.png" /></figure><p>Select the Model you would like try and click on Open Playground. I chose Nova Premier since it was in Spotlight and I am interested more about what AWS offers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kaYn3DiFEKvuqOJDSXK2Yw.png" /></figure><p>Playground window for Nova Premier currently looks like below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vankEf9dIkEz4FgV6rNSag.png" /></figure><p>🧠 <strong>My First Prompt in Nova Premier</strong></p><blockquote>“What will be the future for software developers with AI on rise and how can people scale up their skills to be still on demand”</blockquote><p>Summary of what I could get from Nova</p><pre>The future for software developers is promising as AI enhances productivity <br>and creates new opportunities in specialized fields. <br>To stay relevant, developers should continuously learn AI fundamentals, <br>master related tools, focus on soft skills, engage in open source projects, <br>and network within the industry. <br>Embracing AI as a collaborative tool will help developers thrive in this <br>evolving landscape.</pre><p>Compare Mode</p><p>There is also options to compare two models side by side and validate which response is more interesting to you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rXaU8ravAS0q_boYpCcVbg.png" /></figure><p>You can compare AWS Nova Premier with Meta Llama side by side</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JKeZlMcMn_kPblM9XuJtiQ.png" /></figure><p>It is interesting to see what they respond when provided with same prompt.</p><pre>Which LLM would you prefer if you had to pick one which might be the best <br>for all use cases. Just pick one and give a one line reponse.</pre><p>Nova Premier said it cannot pick one, but Meta Llama picked <em>RoBERTa (Robustly Optimized BERT Pretraining Approach)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mNLcwvEJBtPacMwYyeNJSw.png" /></figure><p>Here’s what I learned from my first day with Bedrock:</p><ul><li>LLMs are easy to setup, compare and test without any prior knowledge</li><li>We can compare multiple models and pick the one that lean toward our own preferences.</li></ul><p>This simple hands on gave me confidence that I don’t need to be an AI professional to start working with LLMs effectively.</p><p>🔜 What’s Next?</p><p>In my next post, I will move beyond the console and explore:</p><p>“<strong>Building My First Generative AI App with Amazon Bedrock and Python</strong>”</p><p>I will integrate Bedrock with a Python script to build a simple text summarizer or chatbot, and later extend it with LangChain for retrieval-augmented generation (RAG).</p><p>If you’d like to follow this series, I will be posting all updates and examples here as I continue my learning path.</p><p>💬 Feel free to share questions or ideas that you would like me to cover in the upcoming posts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e5144ff0a31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Journey to the AWS Golden Jacket]]></title>
            <link>https://medium.com/@shamnad.p.s/my-journey-to-the-aws-golden-jacket-589e15f303f7?source=rss-2e03b6e236c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/589e15f303f7</guid>
            <category><![CDATA[exam-preparation-tips]]></category>
            <category><![CDATA[certification-exam]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[finland]]></category>
            <category><![CDATA[aws-golden-jacket]]></category>
            <dc:creator><![CDATA[Shamnad Shaji]]></dc:creator>
            <pubDate>Wed, 23 Oct 2024 08:04:11 GMT</pubDate>
            <atom:updated>2024-10-23T08:04:11.060Z</atom:updated>
            <content:encoded><![CDATA[<p>The path to earning the prestigious <strong>AWS Golden Jacket</strong> wasn’t a straight line, but a journey of persistence, learning, and balancing priorities. I now hold all <strong>12 active AWS certifications</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JLWqrw_nfAhAFWPIM9cKhw.png" /></figure><p><strong>How the journey Started</strong></p><p>I started learning <strong>AWS in April 2018</strong> while working on a small project that required deploying a simple <strong>Node.js backend</strong> in AWS. That experience piqued my interest in the platform, and I decided to take the <strong>AWS Certified Solutions Architect — Associate</strong> certification later that year. My motivation was to secure a <strong>good salary increment</strong> or to have better leverage for a <strong>salary negotiation</strong> after joining <strong>Gofore</strong> and it worked out well for me. Achieving that certification was the beginning of my AWS certification journey.</p><p><strong>A Short break and then a long break</strong></p><p>I decided to take a break for almost a year since I wanted to focus more on work, as it required more time from me. Got back on track in 2019 after almost a year. Acquired <strong>AWS Certified Developer — Associate</strong> and A<strong>WS Certified SysOps Administrator — Associate </strong>in the same month.</p><p>Then, I took another break for <strong>two years</strong> to focus on my <strong>Master’s Degree in Artificial Intelligence and Data Analytics</strong> from <strong>Jyväskylä University of Applied Sciences</strong>, Finland.</p><p><strong>Back on Track</strong></p><p>Once the Masters was finished I wanted to focus on AWS Certifications and decided to prepare for the exam and I studied intensively, I spend my weekends and evenings after work and used Udemy to prepare for the exam while transiting to work, or taking a walk outside.</p><p>I was able to take 4 certifications in a matter of 3 weeks.</p><ul><li><strong>AWS Certified Solutions Architect — Associate</strong> (2022–09–21)</li><li><strong>AWS Certified Developer — Associate</strong> (2022–09–29)</li><li><strong>AWS Certified SysOps Administrator — Associate</strong> (2022–10–06)</li><li><strong>AWS Certified Cloud Practitioner</strong> (2022–10–11)</li></ul><p>Some quick tips to stay focused:</p><ul><li><strong>Avoid distractions:</strong> Steer clear of watching TV during study sessions.</li><li><strong>Keep your phone out of reach:</strong> Once you start studying, keeping your phone away will help you concentrate better.</li><li><strong>Small sacrifices matter:</strong> To achieve something great, sometimes you need to make small sacrifices in your daily habits</li></ul><p>Now, my count was <strong>4 out of 12</strong>, as the previous certifications from <strong>2018 and 2019</strong> had already expired due to the <strong>3-year validity period</strong>.</p><p><strong>Overcoming Challenges in the Professional Certification Path</strong></p><p>Since I had completed the associate certifications, it was time to shift focus to <strong>professional certifications</strong>. However, I was scared and lacked the confidence to even attempt them. But things changed when <a href="https://gofore.com/en/"><strong>Gofore</strong></a> decided to offer a <strong>500€ certification bonus</strong> for earning professional certifications. The possibility of getting that bonus kept me motivated.</p><p>When I started preparing, I found the <strong>practice exams</strong> incredibly challenging. The scenario-based questions were difficult to understand, and I failed with scores around <strong>40–50%</strong>. It was disheartening, but instead of giving up, I took the time to thoroughly read the detailed explanations for the questions I missed. Slowly, I began to understand the concepts better, and within the next two months, I successfully passed two professional certifications.</p><ul><li><strong>AWS Certified Solutions Architect — Professional</strong> (2022–11–13)</li><li><strong>AWS Certified DevOps Engineer — Professional</strong> (2022–12–04)</li></ul><p>Some quick tips to stay focused:</p><ul><li><strong>Establish a Reward</strong>: Having a specific reward in mind can significantly enhance your motivation. For me, the potential bonus was a major driving force at the time.</li><li><strong>Promise Yourself a Treat</strong>: Consider promising yourself a special item you’ve always wanted. This can serve as a great incentive to stay focused.</li></ul><p>Now the count was <strong>6 out of 12</strong>, almost half way.</p><p><strong>Time for another break</strong></p><p>I took another long break to concentrate on learning the Finnish language and successfully passed the National Finnish language test (YKI) in March 2024. This achievement freed up my schedule once again, allowing me to focus on preparing for the AWS Certifications again.</p><p><strong>Back on Track</strong></p><p>Now, I only needed to take four more certifications since AWS decided to discontinue a couple of them, including the SAP and Database Specialist. This change made my path much easier. My biggest motivation this time was the desire to be the first at <a href="https://gofore.com/en/">Gofore</a> to receive the Golden Jacket, which helped accelerate my schedule and keep me motivated.</p><p>Instead of binge-watching TV series, I binge-watched Udemy courses from Stephane Maarek, and I consider that one of the best decisions I’ve made. In a matter of 4 weeks I was able to get all 4 certifications</p><ul><li><strong>AWS Certified Security — Specialty</strong> (2024–05–12)</li><li><strong>AWS Certified Advanced Networking — Specialty</strong> (2024–05–17)</li><li><strong>AWS Certified Data Engineer — Associate</strong> (2024–05–21 — FAILED)</li><li><strong>AWS Certified Machine Learning — Specialty</strong> (2024–05–26)</li><li><strong>AWS Certified Data Engineer — Associate</strong> (2024–06–04)</li></ul><p>Since I was in a hurry and a bit overconfident, I took the <strong>AWS Certified Data Engineer — Associate</strong> exam without adequate preparation, just 4 days after passing the Advanced Networking — Specialty exam. I became overconfident after successfully completing both specialty exams within a matter of 5 days. That was my first failure. I learned that some failures are necessary to remind us that true confidence comes from thorough preparation, not merely from past successes. Past achievements do not guarantee future success without proper preparation.</p><p>Now the count was <strong>10/10, </strong>and it was time for<strong> Golden Jacket, YAY!!</strong></p><p><strong>Golden Jacket Process</strong></p><p>To receive the Golden Jacket, you need to work for a company that is an AWS Partner. <a href="https://gofore.com/en/">Gofore</a> has been a long-term AWS Partner, which significantly sped up the process. A meeting was arranged within a matter of weeks, and my jacket size was shared with the AWS representative. I was invited to the AWS office in Helsinki for the handover, and it was an exciting day. I received some cool swag from the office, and there was chocolate cake — it was truly a special occasion. I felt incredibly happy wearing the Golden Jacket, as I had never received any extracurricular awards before in my life, making this achievement particularly meaningful for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cA86t9mIrnhN2FcbqDX5uQ.jpeg" /><figcaption>The smile on my face says how happy I am to receive the jacket</figcaption></figure><p><strong>Additional AI Certifications</strong></p><p>AWS decided to release two additional AI-focused certifications in August 2024. This felt like an opportunity I had to seize to justify being a Golden Jacket holder, so I was determined to take the additional two exams. With a well-structured study plan already in place, I was excited to continue my journey. I was still in a hurry, though, as I wanted to earn the Early Adopter digital badges, which are awarded for taking beta exams. I got both of them finally. Making the count now <strong>12 out of 12.</strong></p><ul><li><strong>AWS Certified AI Practitioner</strong> (2024–09–24)</li><li><strong>AWS Certified Machine Learning Engineer — Associate</strong> (2024–10–20)</li></ul><p>I really loved these two certifications because they are closely related to my Master’s degree in Artificial Intelligence and Data Analytics. The topics felt familiar and were easier to understand.</p><p><strong>Here are a few additional tips that helped me:</strong></p><ul><li><strong>Read Questions Carefully</strong>: Sometimes, a single word can change the meaning of a question or the options, so read carefully.</li><li><strong>Flag and Return</strong>: If you’re unsure about a question, flag it and move on. Don’t waste too much time. You can always come back later.</li><li><strong>Focus on Hands-On Experience</strong>: For the <strong>Professional/Specialist </strong>ones, benefit greatly from hands-on labs. Make sure you understand not only the concepts but how they’re applied.</li><li><strong>English as a Second Language(ESI): </strong>Enable accomodation under your certification if english is your second lanague and get an additional 30 minutes for your exam.</li></ul><p><strong>Balancing Work, Family, and Studies</strong></p><p>I started studying during the weekends and at night at home, which meant I often avoided going outside with family and skipped family movie nights. My son frequently asked, “Why are you still studying? Didn’t you already finish school? Don’t you have a job now? Why do you have to study?” It was difficult to help him understand that learning never ends and that there’s value in continuing education even after starting a career.</p><p>Eventually, he agreed to let me study if I promised to buy him a LEGO set of his choice, regardless of the cost, once I got the Golden Jacket. He became so excited that he began motivating me to study whenever he saw me sitting idle, constantly asking, “When are you going to get the Golden Jacket?” This encouragement pushed me to prepare for the exams one by one. Each time I passed an exam, his excitement fuelled my determination to achieve all the AWS certifications.</p><p>One of the proudest moments for me was hearing my son tell my wife that ‘<strong>Papa is a learning machine</strong>’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*v5vaqNwDkSI26TMCPwxb1g.png" /><figcaption>Happy lego owner</figcaption></figure><p>I believe that parents can try this approach to gain their children’s support for their professional endeavours.</p><p><strong>Recommended Study Resources</strong></p><p>When it comes to learning and practice materials, I always prefer the <strong>AWS courses and practice tests on Udemy by </strong><a href="https://www.udemy.com/courses/search/?q=stephane+maarek&amp;src=sac&amp;kw=stephane"><strong>Stephane Maarek</strong></a>. His teaching style and detailed explanations have been a key part of my success, and I highly recommend his courses.</p><p>For additional practice and to build even more confidence before your exams, I suggest taking practice exams from <a href="https://www.udemy.com/courses/search/?features=has_practice_test&amp;q=frank+kane&amp;sort=relevance&amp;src=sac"><strong>Frank Kane</strong></a>, <a href="https://www.udemy.com/courses/search/?features=has_practice_test&amp;q=neal+davis&amp;sort=relevance&amp;src=ukw"><strong>Neal Davis</strong></a>, and <a href="https://www.udemy.com/courses/search/?features=has_practice_test&amp;q=Abhishek+Singh&amp;sort=relevance&amp;src=ukw"><strong>Abhishek Singh</strong></a>. All of these can be found on Udemy and provide a wide variety of questions to prepare you thoroughly.</p><p>This isn’t a paid promotion of Udemy . I’m just used to using the platform. If you find these resources on another platform, feel free to use them.</p><p><strong>Special Thanks</strong></p><p>Special thanks to <a href="https://gofore.com/en/"><strong>Gofore</strong></a> for promoting professional development, covering exam fees, providing certification bonuses, and offering constant motivation and support. Without that, none of my achievements would have been possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=589e15f303f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reduce image size when uploading images to AWS S3 using Nestjs and TypeScript.]]></title>
            <link>https://medium.com/@shamnad.p.s/reduce-image-size-when-uploading-images-to-aws-s3-using-nestjs-and-typescript-e828c347f305?source=rss-2e03b6e236c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e828c347f305</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[resize]]></category>
            <category><![CDATA[resize-images]]></category>
            <category><![CDATA[nestjs]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Shamnad Shaji]]></dc:creator>
            <pubDate>Sat, 22 Jun 2019 10:35:57 GMT</pubDate>
            <atom:updated>2019-06-22T10:37:31.112Z</atom:updated>
            <content:encoded><![CDATA[<p>When implementing image upload you might have faced issues with clients uploading high resolution images even though you might only need low resolution images or resizing the images would help overall performance of your app.</p><p>I faced the same issue recently and had to google the best possible solution. There are several npm packages available out there, but I am sharing the one that was useful to my purpose and may be it will serve yours too.</p><p>If you need help in how to implement image upload using Nestjs and Typescript checkout my other story on that topic.</p><p><a href="https://medium.com/@shamnad.p.s/image-upload-to-aws-s3-using-nestjs-and-typescript-b32c079963e1">Image Upload to AWS S3 using Nestjs and TypeScript.</a></p><p>You can use <a href="https://www.npmjs.com/package/multer-sharp-s3">multer-sharp-s3</a> for reducing image size before uploading them to S3.</p><p>add<em> multer-sharp-s3</em> to your project</p><pre>npm install --save multer-sharp-s3</pre><p>and then import it to your service file for image upload</p><pre>import s3Storage = require(&quot;multer-sharp-s3&quot;);</pre><p>and then update your <em>multer</em> options for image upload by adding <em>resize</em> param.</p><pre>upload = multer({<br>    storage: s3Storage({<br>      s3: s3,<br>      bucket: AWS_S3_BUCKET_NAME,<br>      acl: &#39;public-read&#39;,<br>      key: function(request, file, cb) {<br>        cb(null, `${Date.now().toString()} - ${file.originalname}`);<br>      },<br>      resize: {<br>                width: 600,<br>                height: 400,<br>      },<br>    }),<br>  }).array(&#39;upload&#39;, 1);</pre><p>You can see the custom <em>width</em> and height <em>values</em>. You can have any values based on your own requirement.</p><p>Your service file would look like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d468c9ec932b75425f36d85b7c7ba3b/href">https://medium.com/media/6d468c9ec932b75425f36d85b7c7ba3b/href</a></iframe><p>In case you get the below error while building the project.</p><pre>node_modules/multer-sharp-s3/dist/types/main.d.ts:12:37 - error TS2694: Namespace &#39;global.Express&#39; has no exported member &#39;Multer&#39;.</pre><p>Then add <em>@types/multer</em> to your dev dependencies.</p><pre>npm install --save-dev @types/multer</pre><p>Thats it!. Try your image upload and see the reduced image sizes.</p><p>Let me know if you have any questions or issues.</p><p>The whole source code can be found here.</p><p><a href="https://github.com/shamnadps/Image_upload_typescript">shamnadps/Image_upload_typescript</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e828c347f305" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Image Upload to AWS S3 using Nestjs and TypeScript.]]></title>
            <link>https://medium.com/@shamnad.p.s/image-upload-to-aws-s3-using-nestjs-and-typescript-b32c079963e1?source=rss-2e03b6e236c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b32c079963e1</guid>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Shamnad Shaji]]></dc:creator>
            <pubDate>Sat, 21 Jul 2018 12:37:42 GMT</pubDate>
            <atom:updated>2018-07-21T12:39:36.903Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I had to do an image upload to AWS S3 in my project using Nestjs and Typescript in the backend. I am sharing the simple steps to do this using Typescript and Nestjs, even though this code is for Nestjs and typescript you can refer this for image upload for Nodejs with express too and make the changes accordingly.</p><p>First thing you would need to setup an AWS S3 bucket for image upload. You can refer my medium story on that if you dont know how to do it.</p><p><a href="https://medium.com/@shamnad.p.s/how-to-create-an-s3-bucket-and-aws-access-key-id-and-secret-access-key-for-accessing-it-5653b6e54337">How to create an S3 Bucket and AWS Access Key ID and Secret Access Key for accessing it.</a></p><p>Now you need to setup your backend code for image upload using typescript. You would need the below dependencies for setting up the image upload to S3.</p><pre>npm install aws-sdk multer multer-s3 --save</pre><p>Now all your required dependencies are in place and we can setup the constructor route for image upload</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e21ed383793eb5c5b83b45be2e90bf5/href">https://medium.com/media/6e21ed383793eb5c5b83b45be2e90bf5/href</a></iframe><p>Now you need to have a service class for the same.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/17a6f0b7338422d657b3bb86b6730ea8/href">https://medium.com/media/17a6f0b7338422d657b3bb86b6730ea8/href</a></iframe><p>You need to replace the environment variables with the proper values.</p><pre>AWS_S3_BUCKET_NAME<br>AWS_ACCESS_KEY_ID<br>AWS_SECRET_ACCESS_KEY</pre><h3>Describing the service class</h3><p>Service class is handling the image upload and as you can see there is an upload method, with uploads the file using multer and multer-s3 . The field to send the file is named as upload . and the number of files is specified as the next param. Since we only have one file we are giving the value as 1. array(&#39;upload&#39;,1). You need to use the same name while making the upload requet to the controller.</p><p>And the uploaded file url can be retrieved as req.files[0].location. Since in this case we only have one file, index 0 would do.</p><p>Now you need to create the module file for the same.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/670f838ae7ab659886afd98b398e9b24/href">https://medium.com/media/670f838ae7ab659886afd98b398e9b24/href</a></iframe><p>Now you need to connect this Module to the App Module imports.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48bda66c2654625f45bfb69b82f0cc29/href">https://medium.com/media/48bda66c2654625f45bfb69b82f0cc29/href</a></iframe><p>Now you can run your typescript application using npm start. Once the application is up and running you can test your image upload using postman.</p><h3>Testing Using postman</h3><p>Make sure to select form-data and enter key as upload and then select a file and send the request to server. If you have given the AWS credentials and bucket name correctly then the image will be uploaded to S3 and you will get the image url as response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dZevsdJEaLS41Xg5tUhSew.png" /></figure><p>Thank you for reading!.</p><p>The entire source code for this can be found here.</p><p><a href="https://github.com/shamnadps/Image_upload_typescript">shamnadps/Image_upload_typescript</a></p><p>Let me know if you have any feedback or comments or if you face any issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b32c079963e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create an S3 Bucket and AWS Access Key ID and Secret Access Key for accessing it.]]></title>
            <link>https://medium.com/@shamnad.p.s/how-to-create-an-s3-bucket-and-aws-access-key-id-and-secret-access-key-for-accessing-it-5653b6e54337?source=rss-2e03b6e236c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/5653b6e54337</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-s3]]></category>
            <dc:creator><![CDATA[Shamnad Shaji]]></dc:creator>
            <pubDate>Sat, 21 Jul 2018 11:05:09 GMT</pubDate>
            <atom:updated>2018-07-21T11:07:50.260Z</atom:updated>
            <content:encoded><![CDATA[<p>These are simple steps to get an <em>Access Key ID</em> and <em>Secret Access Key</em> for AWS account which gives you access to your AWS services. Even though you have a detailed documentation on AWS, this is just direct instruction for creating an S3 bucket.</p><p>The first thing you would need is an AWS account, if you dont have one create a new one going to <a href="https://aws.amazon.com/">https://aws.amazon.com</a>. You will have to give your credit card details and it will charge you 1$ to verify your account.</p><h3>Creating an S3 Bucket</h3><p>Once your account is setup login to your aws console <a href="https://console.aws.amazon.com/">https://console.aws.amazon.com</a> and select S3 from services menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Unv_DY5lgeV2dQWr5tbY-Q.png" /></figure><p>You can select S3 from the <strong>Storage</strong> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CB_R9Hv5eIgzoUZ_GpKNsw.png" /></figure><p>And then create a bucket in your S3. You can give any names thats available. S3 names are global and you cannot use a name which has been used by anyone else. You could for example create one with your project name similar to . <strong><em>projectnameS3bucket</em>.</strong></p><p>Select a region near to you and the click create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X2oBYmmjeSvfCP_3Sh_3Yw.png" /></figure><p>You will have an S3 bucket created under your Amazon S3 section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9v0mX9RBO3PUSxIUzGzoKQ.png" /></figure><h3>Generating AWS Access Key ID and Secret Access Key</h3><p>Now you can easily access this account using your Access key and Secret Access key of your AWS account. If you dont have one already then go to your account and click on <strong>My Security Credentials</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rTEm9rsrNd08WJ_NidPF-g.png" /></figure><p>And then select <strong>Access keys (access key ID and secret access key) </strong>section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sUCruQqq4XXzzb3f6jo-iQ.png" /></figure><p>There is an important notification on the section, which recommends you to create an IAM Role instead of creating root access keys.</p><p>Click on <strong>Create New Access Key</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnoGdXOKXSfZEY499LiRZg.png" /></figure><p>Download the Key pairs to your system for future use.</p><p>Click on <strong><em>Show Access key</em></strong> and you will get your <strong><em>Access Key ID</em></strong> and <strong><em>Secret Access Key.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3y6O-xPxKH3jNYLbMJfoPA.png" /></figure><p>You need to use this<strong><em> Access Key ID</em></strong> and<strong><em> Secret Access Key</em></strong> to connect to your AWS connect and acesss the S3 bucket.</p><h3>Installing AWS CLI</h3><p>Now you need to install awscli to your account.</p><p>Using npm</p><pre>npm install awscli</pre><p>Using home-brew in MacOS</p><pre>brew install awscli</pre><p>Check the aws version is installed or not by the following command</p><pre>aws --version</pre><p>Now set your AWS account credentials using the below command and enter your Access key ID and Secret Access Key which you generated earlier. You can use default for region and output format</p><pre>aws configure<br>AWS Access Key ID [****************]:<br>AWS Secret Access Key [****************]:<br>Default region name [eu-west-1]:<br>Default output format [None]:</pre><p>Now you can access your S3 and see the bucket you created by running the below command.</p><pre>aws s3 ls</pre><p>All the buckets under your account will be listed here.</p><p>Hope this have helped someone!. Feel free to correct me or comment on anything that is incorrect or can be improved!.</p><p>Thank you for reading!.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5653b6e54337" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>