<?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[CloudForDummies - Medium]]></title>
        <description><![CDATA[A Dummies Guide to Everything on Cloud . Speaking in simple terms , simple how-tos and a lot more. We are on Telegram https://t.me/cloudfordummies - Medium]]></description>
        <link>https://medium.com/cloudfordummies?source=rss----5d339637b0c---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>CloudForDummies - Medium</title>
            <link>https://medium.com/cloudfordummies?source=rss----5d339637b0c---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 16:52:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/cloudfordummies" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Power BI Integration for Mongo DB community edition— A Dummies Guide]]></title>
            <link>https://medium.com/cloudfordummies/power-bi-integration-for-mongo-db-community-edition-a-dummies-guide-f29619d5f75c?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/f29619d5f75c</guid>
            <category><![CDATA[mongodb-community]]></category>
            <category><![CDATA[documentdb]]></category>
            <category><![CDATA[reporting-software]]></category>
            <category><![CDATA[mongodb-tutorial]]></category>
            <category><![CDATA[power-bi-tutorials]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Wed, 03 Jul 2024 15:02:49 GMT</pubDate>
            <atom:updated>2024-07-03T15:02:48.363Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*gX7vyYwXHZ6fzXVKSWXGEQ.png" /><figcaption><strong>Power BI — Mongo</strong></figcaption></figure><p>Although this is a dummies guide to setup Power BI integration for Mongo DB community edition , I took the liberty to add a bit on NOSQL , SQL and Reporting tools to provide a better overview to the reader about <strong>why we do what we do.</strong></p><p><strong>This</strong> <strong>integration is available out of the box with the Atlas Power BI connector</strong> . But Atlas connector <strong>will only work with commercial edition</strong> of MongoDB (Atlas) and not the community edition.</p><p>You can check out the pricing <a href="https://www.mongodb.com/pricing">here</a> for the Atlas edition.</p><p>However this is <strong>not the end of world</strong> . Mongo DB supports Power BI Integration for community edition too ( free of cost ) . Except that it has to be configured in a multi-step process that is <strong>not so well documented</strong>.</p><p>If you have been following my guides , then you know that’s something I love doing . <strong>Try to</strong> <strong>document the un-documented or ill-documented.</strong></p><p>This guide is a result of a setup I did for a friend.</p><p>Before we go further , we need to understand a few basic things about <strong>NOSQL databases </strong>and <strong>Reporting tools</strong> that are critical when you consider this integration.</p><p>It is easy to read NOSQL as “<strong>NO</strong>” SQL sometimes a deliberate attempt by un-initiated enthusiasts as an act of defiance to all RDBMS systems that confirm to the SQL or <strong>Structured Query Language</strong> construct.</p><p>But <strong>NOSQL </strong>should not be interpreted as “<strong>NO</strong>” SQL but as “<strong>Not Only</strong>” SQL or <strong>“Non”</strong> SQL . It implies that these databases can also support a SQL construct other than their own data retrieval constructs.</p><p><a href="https://www.ibm.com/topics/nosql-databases#What+is+a+NoSQL+database%3F">What Is a NoSQL Database? | IBM</a></p><p>We also need to understand why SQL construct is important for reporting tools . It is a basic requirement for any <strong>dbms</strong> to be able to respond to a data retrieval request ( <strong>a.k.a a select query</strong> ) in an efficient manner . And as reporting tools were designed to connect to a variety of different dbms systems they needed a common construct / way to interact with different database management systems. <strong>SQL is a natural , efficient and effective choice for data retrieval from DBMS ) for reporting tools.</strong></p><p>I’m not personally a fan of AWS Documentation , I can make an exception for this one about SQL.</p><p><a href="https://aws.amazon.com/what-is/sql/#:~:text=Structured%20query%20language%20(SQL)%20is,relationships%20between%20the%20data%20values.">What is SQL? - Structured Query Language (SQL) Explained - AWS</a></p><p>So when it comes to connecting to connecting a NOSQL database to a reporting tool such as PowerBI or Tableau what do we do ?. The answer is obvious . We setup an SQL layer to enable to interaction between the database and the reporting front-end.</p><p>Now its time to setup the integration.</p><p><strong>Pre-requisites:</strong></p><p><strong>VM / Laptop with Windows :</strong></p><p>You could do this setup on your own windows laptop or a virtual windows machine. The screenshots that I have shared are from my AWS Virtual machine running the following image amazon/Windows_Server-2022-English-Full-Base-2024.06.13 ( AMI ID : <a href="https://us-east-1.console.aws.amazon.com/ec2/home?region=us-east-1#Images:visibility=public-images;imageId=ami-04df9ee4d3dfde202">ami-04df9ee4d3dfde202</a> )</p><p>But this should work in any windows machine. By the way why a Windows Machine ? . Because I did not want to go into the complexities of running Power BI in Mac or Linux . It is for another day. For now lets <strong>keep it simple silly</strong>.</p><p><strong>Installation of Mongo DB Community Edition :</strong></p><p>Install Mongo DB on the laptop or VM where you want the DB to be running. Follow the default installation process.</p><p><a href="https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-windows/#std-label-install-mdb-community-windows">Install MongoDB Community Edition on Windows</a></p><p><strong>Installation of Power BI Desktop :</strong></p><p>Download and install the Power BI Desktop from the link below</p><p><a href="https://go.microsoft.com/fwlink/?LinkId=2240819&amp;clcid=0x409&amp;culture=en-us&amp;country=us">https://www.microsoft.com/en-us/download/details.aspx?id=58494</a></p><p><strong>Installing the Mongo DB BI Connector : ( Enabling the SQL layer )</strong></p><p><a href="https://www.mongodb.com/docs/bi-connector/current/tutorial/install-bi-connector-windows/">Install BI Connector on Windows</a></p><p><strong>What does this does ?</strong></p><p>Citing the Mongo DB Documentation .</p><p><a href="https://www.mongodb.com/docs/bi-connector/current/reference/mongosqld/#mongodb-binary-bin.mongosqld">mongosqld</a> is the BI Connector program which connects your MongoDB instance to your BI tool. <a href="https://www.mongodb.com/docs/bi-connector/current/reference/mongosqld/#mongodb-binary-bin.mongosqld">mongosqld</a> requires a data schema which maps to your MongoDB collections and databases.</p><p>Under the hoods this installs an exe file called mongo<strong>sql</strong>d ( <strong>not surprisingly</strong> ) create the SQL layer for reporting software to interact / integrate with Mongo DB.</p><p>Throwing another hint on <strong>what kind of sql </strong>this layer is using. Look at the port and see if you can guess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*9uGBCMXCdqV6jg87NNyPsQ.png" /></figure><p><strong>What to keep in mind ?.</strong></p><p><strong>Install the mongosqld as a system service</strong>. This way it is constantly running on the server where your database is running.</p><p>Ensure the <strong>path variable exists in the directory.</strong></p><p><a href="https://www.mongodb.com/docs/bi-connector/current/launch/#std-label-msqld-as-a-system-service">Launch BI Connector</a></p><p><strong>How to verify ?.</strong></p><p>After you install the service you can see both the services are running in your services window ( <strong>services.msc</strong> )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TnXtpZ94Vi3p-HMG7Bi4-Q.png" /></figure><p><strong>Installing the Mongo DB ODBC Connector: ( Enabling the connection from PowerBI)</strong></p><p><strong>Note:</strong> This ODBC Driver must be installed in the same desktop if you are using Power BI Desktop.</p><p>Download and Install the ODBC Driver from link below:</p><p><a href="https://github.com/mongodb/mongo-bi-connector-odbc-driver/releases/">Releases · mongodb/mongo-bi-connector-odbc-driver</a></p><p>Before proceeding further check if the ODBC drivers are available in the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*nxms7FTMuWKvwbKq0pUboQ.png" /></figure><p><strong>Create the ODBC Connection and the Power BI Report</strong></p><p><a href="https://www.mongodb.com/docs/bi-connector/current/connect/powerbi/">Connect from Microsoft Power BI Desktop</a></p><p><strong>High Level interaction between components</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*2Vcm58SvY2O9Dyu6aLyDqQ.png" /></figure><p><strong>A short demo video of the report that I designed after the setup</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fn-_9kpRhfNI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dn-_9kpRhfNI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fn-_9kpRhfNI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3859b0b21840a9b10f0ae6c176570a4c/href">https://medium.com/media/3859b0b21840a9b10f0ae6c176570a4c/href</a></iframe><p><strong>Sample Baseball Dataset used in the report</strong></p><p><a href="https://github.com/pandas-dev/pandas/blob/main/doc/data/baseball.csv">pandas/doc/data/baseball.csv at main · pandas-dev/pandas</a></p><p><strong>Mongo DB database after data imported for reporting</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7aYtdTMMpEuV0vHUyBn1A.png" /></figure><p><strong>Closing notes:</strong></p><ol><li>The setup is not optimized in anyway for a production workload. Hence not at all advisable if you want mission critical reporting with this combination.</li><li>This clearly establishes the underlying need for SQL API interface to interact with a document db such as Mongo DB.</li></ol><p>Please follow this space for the next steps where we scale this setup .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f29619d5f75c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/power-bi-integration-for-mongo-db-community-edition-a-dummies-guide-f29619d5f75c">Power BI Integration for Mongo DB community edition— A Dummies Guide</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Logic Apps — Notify your Youtube channel updates to your Telegram Group]]></title>
            <link>https://medium.com/cloudfordummies/azure-logic-apps-notify-your-youtube-channel-updates-to-your-telegram-group-04a8a85c33ab?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/04a8a85c33ab</guid>
            <category><![CDATA[telegram-bot]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[youtube]]></category>
            <category><![CDATA[azure-logic-apps]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Fri, 01 Dec 2023 20:44:28 GMT</pubDate>
            <atom:updated>2023-12-01T20:44:28.150Z</atom:updated>
            <content:encoded><![CDATA[<h3>Azure Logic Apps — Notify your Youtube channel updates to your Telegram Group</h3><p>This is part of my Logic Apps collection of articles.</p><p>Logic Apps is a no-code workflow offered by Microsoft Azure. The most cool thing about Logic Apps is the ability to develop workflows with connectors to achieve many tasks that otherwise would have required a lot of lines of code .</p><p>The workflows can be both stateless and stateful . More on this for another article.</p><p>Today’s focus is to understand the simplicity of Logic Apps in enabling an integration for two most popular cloud services <a href="https://telegram.org/">Telegram</a> and <a href="https://www.youtube.com/">Youtube</a>.</p><p><strong>What to expect in this article ?</strong></p><p>A bare minimum working setup with default settings. However there is a huge scope for customization if you wish to apply the thought process to your use case.</p><p><strong>What does our Logic App do ?</strong></p><ol><li>It watches for a particular channel in Youtube for any new updates ( such as a new video getting uploaded )</li><li>Notifying about the video with a link to the video on a dedicated Telegram channel.</li></ol><p><strong>What do we need for this ?</strong></p><ol><li>Obviously a free Azure Account .</li><li>Your own telegram account to setup the demo.</li><li>Any youtube channel that you have subscribed to and want to broadcast to your telegram channel.</li></ol><p><strong>Why Telegram ?</strong></p><ol><li>Telegram has a quite a bit of free features to demonstrate automated messaging capabilities .</li><li>To achieve the same with WhatsApp or a similar platform would have been difficult. ( Telegram setup for this article took just 1 minute to create a bot , create a channel and make the bot an admin to the channel )</li></ol><p><strong>Details you will not find here .</strong></p><p>Steps needed for you to create a telegram bot , channel . But if you are curious check out my article from the past .</p><p><a href="https://medium.com/cloudfordummies/building-a-telegram-bot-for-cowin-shot-slots-9b15355c5b8e">Building a Telegram Bot for Cowin Shot Slots</a></p><p><strong>Video :</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FAmufkYK8l5g%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAmufkYK8l5g&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FAmufkYK8l5g%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d88a53df2c6b9fcd8605083ce12ddc9e/href">https://medium.com/media/d88a53df2c6b9fcd8605083ce12ddc9e/href</a></iframe><p><strong>Telegram Notification:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ew7tpX9VX7Wz0OWRqKUmyw.png" /></figure><p>The video that I created for this process was uploaded by me and as soon as the trigger was detected , the telegram channel received a notification via Logic App.</p><p><strong>Observe that the user is a bot user.</strong></p><p><strong>Clean-up</strong>:</p><p>If you observed the integration setup for YouTube , <strong>it was a schedule of 1 minute.</strong></p><p><strong>What does this mean ?</strong> The logic app will invoke every minute to poll the youtube account for any new update and if a new video is found , it will send a notification.</p><p>It is not sensible to setup the frequency to be so quick as you are not going to upload any videos like that. May be setting up the frequency to once a day makes a lot of sense.</p><p>As the Logic App was created in the most basic tier there won’t be any significant costs . However to avoid any surprises , please either delete the logic app or atleast disable it .</p><p><strong>Where to do this ?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FgVLsdFmKbv0DcLRriTCOQ.png" /></figure><p><strong>What next ?</strong></p><p><strong>Check out other triggers around Youtube with Logic Apps</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*iSYg-IMMYUsEFWYNqlEr6A.png" /></figure><p>If you want to checkout the Telegram Channel I created for this demo .</p><p><strong>Note : I may consider deleting this channel in the future . So if you are reading this and unable to find the channel don’t panic.</strong></p><p><a href="https://t.me/+8I-2aG4keRZhODU1">Youtube2Telegram</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=04a8a85c33ab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/azure-logic-apps-notify-your-youtube-channel-updates-to-your-telegram-group-04a8a85c33ab">Azure Logic Apps — Notify your Youtube channel updates to your Telegram Group</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Dummies introduction to Generative AI]]></title>
            <link>https://medium.com/cloudfordummies/a-dummies-introduction-to-generative-ai-2f0c0a5e0e9f?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/2f0c0a5e0e9f</guid>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Wed, 19 Apr 2023 17:55:08 GMT</pubDate>
            <atom:updated>2023-04-19T17:55:08.849Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0awb2JfyWSrlTBdTzIZmng.jpeg" /><figcaption>Image copyright to original owners</figcaption></figure><p>We all have heard the terms <strong>ChatGPT , OpenAI , GPT3</strong> . And then the various tall claims about this being a disruptor for many industries. My aim is to demystify some of these concept and topics so that you can explain it to anyone or make sense still if someone tries to confuse you with complex jargons.</p><p>To put it in simple terms <strong>Generative AI</strong> is nothing but AI that can be used to well <strong>“generate”. </strong>Sounds silly ? Extremely dumb ?. Hang on.</p><p>By “generate” what do I mean ?. Well for example , generating an email response , a short story , a simple image , a sonnet maybe. Sounds interesting ?.</p><p><strong>I’m sure you have used the auto-complete feature in Google search</strong> ?. Think of it as a very basic implementation Generative AI where query suggestions<strong> </strong>were<strong> generated</strong> by the model based on the terms you type on the search bar. They simply trained their models against the zillions of queries searched by users across the world and generated suggestions or queries .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*nhMThRUsSQMP4CUHm7HFvw.png" /><figcaption><strong>Google autocomplete feature</strong></figcaption></figure><p>Generative AI is supported by <strong>GPT or Generative Pre-trained Transformers takes this “generate” capability further by several levels .</strong></p><p><strong>GPT </strong>are a family of large-language models trained using <strong>artificial neural networks using </strong><a href="https://en.wikipedia.org/wiki/Transformer_(machine_learning_model)"><strong>transformer architecture</strong></a><strong> </strong>on <strong>massive un-labelled text data to generate human-like text responses</strong>.</p><p><strong>ChatGPT is nothing but a chatbot with a web-chat like interface</strong> that sits on the top of the latest GPT model which enables you to query the model to provide with you fancy responses. If you have experienced a chat-bot anywhere else then the concept is very similar except for the fantastic models under the hood.</p><p>Now that we have a very basic understanding of the different jargons let us dig a bit deeper.</p><p><strong>What are Large Language Models and how are they defined?</strong> <strong>How large is a Large Language Model?</strong></p><p>The term <strong>“Large” here refers to the number of parameters</strong> that were used to train the model. Here’s a summary of the versions of GPT models released so far along with the parameter count.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dq1fHFjuj-90rEpvWfR_6g.png" /></figure><ul><li><strong>RLHF stands for Re-inforcement Learning with Human Feedback</strong> <strong><em>(the infamous </em></strong><a href="https://www.techgoing.com/the-sweatshop-behind-chatgpt-is-exposed/"><strong><em>OpenAI sweatshop saga</em></strong></a><strong><em> where low paid human advisors were used to label text and provide feedback to the model to improve its performance )</em></strong></li></ul><p><strong>Can these models answer all the questions that humanity has ?</strong></p><p>Now what all a <strong>Generative AI can generate </strong>depends on the knowledge it has amassed . <strong>Focus on the word pre-trained transformers</strong>. This means that the model’s wealth of knowledge is limited to the vast amount of data it has been trained with.If some data was not fed to the model then it is not known to the model and therefore it cannot generate content around it or answer the question. <strong>This applies to many fields that are bound to have new approaches emerging from time to time such as Scientific Research , Medicine , Art , Literature , Mathematics to name a few.</strong></p><p>Would it have been possible for GPT to generate a proof to the Pythagorean theorem like the 2 high-schoolers using Trignometry ?. Hard to answer.</p><p><a href="https://www.scientificamerican.com/article/2-high-school-students-prove-pythagorean-theorem-heres-what-that-means/#:~:text=Two%20high%20school%20students%20have,an%20American%20Mathematical%20Society%20meeting.">Attempt to proove Pythagores Theorem using Trignometry</a></p><p><strong>Are these models biased ?</strong></p><p>It’s hard to say that they are not. Because it depends on the data it has been trained with. Let’s not get into the ethics angle for now. That’s for another day.</p><p><strong>Can I use these models for any language that I wish ?</strong></p><p>Some of the languages that GPT-3 has been trained in include English, Spanish, French, German, Italian, Portuguese, Dutch, Russian, Chinese, Japanese, Korean, and many more. However there’s a fair chance that a language that you are looking to use is still not supported. And it is simply due to the lack of sufficient data pertaining to that language.</p><p>That doesn’t mean the end of the world. You could still intermediate translator engines as a work-around . But then the outcome is only as good as the translation process.</p><p><strong>Can the responses be trustworthy ?</strong></p><p>You get what you ask for. It’s that simple. For example , if you simply ask “Who is the president of United States” it will understand the question in the context of “current president” and get you the answer Joe Biden.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*2tLmm6Hvjk50p9-nwQwuCg.png" /></figure><p>It’s simply the parameters that hold the most relevance that decide the outcome. <strong>Does that mean the outcome of the model can be manipulated ? Hell yeah with relevant manipulated data !! Always be cautious.</strong></p><p>Another example. In the previous screenshot the model said it only has data till 2021 . Therefore its obvious that the on-going Russia-Ukraine conflict is un-known to the model. Yet another time the model’s limitations on knowledge being highlighted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*-Duym7KovL-Koev7D2c9ag.png" /></figure><p><strong>How does it generates code ?</strong></p><p>Quoting the documentation. The <a href="https://platform.openai.com/docs/models/codex">Codex model series</a> is a descendant of our <a href="https://platform.openai.com/docs/models/base-series">GPT-3 series</a> that’s been trained on both natural language and billions of lines of code. It’s most capable in Python and proficient in over a dozen languages including JavaScript, Go, Perl, PHP, Ruby, Swift, TypeScript, SQL, and even Shell.</p><p>It’s the collective intelligence of millions of developers if I may call it.</p><p><a href="https://platform.openai.com/docs/guides/code">OpenAI API</a></p><p><strong>Can you customize the models against your own knowledge base ?</strong></p><p>Let’s say your organization has a large volume of data <strong>that is not publicly available. </strong>You can use the commercial version of OpenAI API to train the model to ingest your own data and thereby enable the model to answer prompts relevant to your data.</p><p>There are several tutorials strewn around for this concept. Keep on the lookout for my upcoming article on this.</p><p><strong>Parting thoughts</strong></p><p>At this stage we have established a basic understanding of Generative AI . Remember one simple thing. <strong>Any AI is only as good as the data and the methods they were trained with.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f0c0a5e0e9f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/a-dummies-introduction-to-generative-ai-2f0c0a5e0e9f">A Dummies introduction to Generative AI</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing Cloud Functions -Part 1 — Using AWS KMS for environment variables]]></title>
            <link>https://medium.com/cloudfordummies/securing-cloud-functions-part-1-using-aws-kms-for-environment-variables-1409597a38ba?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/1409597a38ba</guid>
            <category><![CDATA[aws-lambda-functions]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloudfordummies]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Thu, 28 Oct 2021 16:21:05 GMT</pubDate>
            <atom:updated>2021-10-28T16:21:05.293Z</atom:updated>
            <content:encoded><![CDATA[<h3>Securing Cloud Functions -Part 1 — Using AWS KMS for environment variables</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*oFUUXXk29Q8NyBfJ4-YJsw.png" /></figure><p>Cloud Functions are one of the leading serverless offering in cloud market. The versatility provided by this component is very competitive against the traditional methods such as IAAS and PAAS . FAAS ( Functions As A Service ) is an economical yet powerful way to scaleup applications and provide exceptional user experience.</p><blockquote>With Great Power comes Great Responsibility</blockquote><p>Obviously isn’t it.Irrespective of provider , it is essential to secure your Cloud Function to prevent un-authorized access / usage .</p><p>If you are new to Cloud / Cloud Funtions , you are at the right place. Consider taking a look at my other articles on my publication here.</p><p><a href="https://medium.com/cloudfordummies">CloudForDummies</a></p><p>I assume the following about the reader but nevertheless will explain key concepts in basic terms . <strong>My goal is to write to the level of dummies.</strong></p><ol><li>Have an understanding of AWS Lambda by now . But still if you are unsure , fret not there’s reasonable documentation available here in <a href="https://docs.aws.amazon.com/lambda/index.html">AWS</a>.</li><li>You are a programmer / developer who understands what are environment variables</li><li>You have a basic understanding of what the words encryption and decryption mean</li><li>Some basic idea of Python . Even if you don’t it shouldn’t be a challenge as Python code is mostly readable .</li></ol><p><strong>What are environment variables and why to use them?</strong></p><p>Simply put environment variables are otherwise constants that are normally hardcoded in your program.</p><p><strong>Example</strong> : The obvious cuplrits including <em>Database Server Name , DB User Name , Password and the list gets uglier</em>.</p><p>Imagine your code falling into the hands of a rogue user and all the credentials are exposed in a moment ?. You wouldn’t want that do you ?</p><p>So you can simply add these values as environment variables and refer to them</p><blockquote>Great . So now you are using environment variables and not hardcoding your credentials in your code . Why go further ?</blockquote><p><strong>Why securing environment variables are essential ?</strong></p><p>Let’s get specific now with AWS Lambda now. AWS Lambda allows you to execute code without having to worry about the underlying infrastructure such as the operating system , frameworks et all . So all you have to worry about is the code.</p><p>However , if you have a junior developer who cannot still be trusted with the credentials to your production database or worse if it is a compliance requirement that no one should know the password to production database except for the Database Administrator ?</p><p>Things now get complex aren’t they ?.</p><p><strong>How do I secure my environment variables in Lambda ?</strong></p><p>AWS -KMS ( Key Management Services ) . Quoting from AWS</p><blockquote>AWS Key Management Service (KMS) makes it easy for you to create and manage cryptographic keys and control their use across a wide range of AWS services and in your applications. AWS KMS is a secure and resilient service that uses hardware security modules that have been validated under FIPS 140–2, or are in the process of being validated, to protect your keys. AWS KMS is integrated with AWS CloudTrail to provide you with logs of all key usage to help meet your regulatory and compliance needs.</blockquote><p>So essentially you can use a key hosted in AWS to encrypt and decrypt all your secrets.</p><p><strong>So what do you do exactly ?</strong></p><p>In a simple flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*1sNm6GwLb3xCf1WhtrCsIA.png" /></figure><p>Let’s see how do we do this.</p><blockquote><strong>Important : KMS Keys are chargeable at $1 per month . So it’s a good idea to delete them immediately after this tutorial</strong></blockquote><p><strong>Step 1: Create a key on KMS .</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UrYepaSemN3s1gaA7MQlhA.png" /></figure><p>Click on Create a key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*3S5S5ST7XOZ7-NzDRD4_og.png" /></figure><p>Leave the default options</p><p>After choosing a name of your key ( remember this as you need this at the time of lambda function , skip the administrative permissions section and proceed to usage permissions. Here you can assign the key to be used by your lambda function execution role.( <strong>don’t worry you can even come back later if you have not already created a lambda function role</strong> )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*9hqZsRVlV0x4FIv2F2lMew.png" /></figure><p>Now hit finish to save the key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*pLBaNEGFYwiEvo1xeK6D2w.png" /></figure><p><strong>Step 2 : Create a basic lambda function with an environment variable</strong></p><p>Click on the create button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J7LBhzqijC1Ekiw-5ZmWZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zqUmIXZyHckT_QCTpYEQ8Q.png" /></figure><p>Leave the defaults except for the name of the function and enter a desired name.</p><p><strong>Note : I have selected Python Runtime .</strong></p><p>Now you can see the lambda execution role created automatically for your function here</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GzWFhyPbJ3qtMJyk-WQz-Q.png" /></figure><p>Remember to grant permissions to this execution role in the KMS screen we saw previously.</p><p><strong>Step 3: Now let’s create an environment variable and encrypt it</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d88qgQpsAZxzKxiiP9U7Ow.png" /></figure><p>Hit the edit button and create a simple env variable called “testvariable”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*9BL7gqW5M7nfQprmvh0d0w.png" /></figure><p>When you expand the Encryption Configuration , you ‘ll get more options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*FQ1r60Vnolqktej42WcPlA.png" /></figure><p>Select Encryption in transit and you’ll get an Encrypt key against the variable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*Zjn8XP67ft8l5qFTZuw7tA.png" /></figure><p>Also, change the AWS KMS Key option to “Use a customer master key”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*0XqcOuWo9kOI7TXe55FgMA.png" /></figure><p><strong>Now Hit Encrypt</strong></p><p>Here select the Key that you created in KMS and encrypt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*AQd11WJdgGkemKNWqMRENA.png" /></figure><p>Now you can see that the value is encrypted</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*IyW8Z6XddqLUB0vrHeyjpQ.png" /></figure><p><strong>Finally, press Save button.</strong></p><p><strong>We are all set for decrypting the value during run-time.</strong></p><p><strong>Step 4: Testing Decryption with a simple code.</strong></p><p>Before testing , lets in create the timeout under configuration section to 1 minute. This is required to ensure that API Call to KMS is made and successfully completed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wYy6d3U2ilnXvqDW9OpIzA.png" /></figure><p>Paste the sample code below in the code tab.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51a6396b2a6d341f69d3c01b1fc95a92/href">https://medium.com/media/51a6396b2a6d341f69d3c01b1fc95a92/href</a></iframe><p>Now hit the “Test” button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*mulrj6FlrJXdn2aXwuob7w.png" /></figure><p>Give an Event name and proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*ahdELkiLQH2wPMwQynpc0Q.png" /></figure><p>Your lambda function executes successfully and the encrypted environment variable is decrypted on run-time and provided. <strong>Safe and Secure.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*9QoOUrEmmnA9tKjQ4KeZRw.png" /></figure><p><strong>Step 5: Cleanup Time</strong></p><p><strong>Remember to delete the Key</strong></p><p><strong>Closing thoughts</strong></p><ol><li>AWS KMS provide a dependable , compliance centric way to encrypt your secrets .</li><li>By isolating secrets from code , the code is more secure and transparent for developers</li><li>By extending CI/CD pipelines , developers no longer even need to reach the Lambda console for deployment.</li><li>Secure , Safe , Compliant FAAS</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1409597a38ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/securing-cloud-functions-part-1-using-aws-kms-for-environment-variables-1409597a38ba">Securing Cloud Functions -Part 1 — Using AWS KMS for environment variables</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dummies Guide to Azure ARM Templates- Deployment Governance]]></title>
            <link>https://medium.com/cloudfordummies/dummies-guide-to-azure-arm-templates-deployment-governance-cb1b99435bc8?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/cb1b99435bc8</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloudfordummies]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Tue, 26 Oct 2021 16:57:35 GMT</pubDate>
            <atom:updated>2021-10-26T16:57:33.512Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*5PKeNigGW6DEFude.png" /><figcaption>ARM</figcaption></figure><p>This is the second post of series covering Azure ARM Templates. If you are looking at this post without reading the previous one, I’d suggest you to take a quick look at part 1 below before proceeding furthre . We are going to use some of the concepts and code from the previous article here.</p><p><a href="https://medium.com/cloudfordummies/dummies-guide-to-automating-azure-deployments-with-arm-templates-3164193cae3b">Dummies guide to Automating Azure Deployments with ARM Templates</a></p><p>Imagine a situation where you are required to delegate resource deployment access to several devops teams and ending up to deal with a messy infrastructure that is non-compliant in many ways .</p><p><strong>Some Challenge in delegation of access to infrastructure deployment</strong></p><ol><li>Users may not be well versed with all the necessary parameters required for a resource</li><li>Users may not be compliant to naming conventions</li><li>Users may be attempting to create resource with higher specifications that are not budgeted</li></ol><p>Rings a bell ?. That’s exactly where ARM templates provide governance capabilities.</p><p>Let’s quickly get on with how are we going to implement it.</p><blockquote>Requirements to successfully complete this tutorial are enlisted in my <a href="https://medium.com/cloudfordummies/dummies-guide-to-automating-azure-deployments-with-arm-templates-3164193cae3b">part 1</a> of this series. Please ensure to have all of them before proceeding further.</blockquote><p>In order to improve standardization further, I have also introduced a Git repository from where the deployment file will be accessed . <strong><em>Feel free to clone my Git repository that has the code for this tutorial </em></strong>. Do make a point to star it and keep it on your watch list . I’ll be adding more such useful deployment configurations soon for advanced concepts.</p><p><a href="https://github.com/rajeshr6r/arm_templates">GitHub - rajeshr6r/arm_templates</a></p><p>In this tutorial , we are going to look at how to use parameters to introduce constraints at the time of resource creation.</p><p>First Let’s look at the file <a href="https://raw.githubusercontent.com/rajeshr6r/arm_templates/master/azresourcedeploywithparams.json"><strong>azresourcedeploywithparams.json</strong></a> from the repository.</p><p>It contains 4 parameters that we are going to use.</p><ol><li><strong>storageaccountname</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*93JoMqStrk0BBVHTYa5c-g.png" /></figure><p><strong>Constraints</strong> : Length of the storage should be between 8–16 characters</p><p>2.<strong>storagelocation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*xKgZ9lUFFe80CTLFke6AxA.png" /></figure><p><strong>Constraints</strong> : Default location will be location of the resource group if not specified . Else should be one of the allowed values.</p><p>3.<strong>storagekind</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vzSuEpRb70H5HehUlSwmhw.png" /></figure><p><strong>Constraints : </strong>Only StorageV2 accepted</p><p>4.<strong>storagesku</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FfUjDfMmhY33WU90_vfibA.png" /></figure><p><strong>Constraints : </strong>Default sku will be Standard_LRS if not specified . Else should be one of the allowed values.</p><p>Now let’s construct a deployment command with deliberate intent to break validation of each parameter and see the errors.Look at the highlighted areas where I have provided a new parameter ( from the previous post ) called template uri . By using template uri , you can simply refer to the json template that you have in a central repository.</p><pre>az deployment group create --resource-group rg-demo-arm <strong>--template-uri</strong> <strong>&quot;https://raw.githubusercontent.com/rajeshr6r/arm_templates/master/azresourcedeploywithparams.json&quot;</strong> --parameters storageaccountname=<strong>&quot;qwe4&quot;</strong> storagelocation=<strong>&quot;eastus&quot;</strong> storagekind=<strong>&quot;StorageV1&quot;</strong> storagesku=<strong>&quot;Standard_RAGZRS&quot;</strong></pre><p>Before firing this command , please ensure to login to your azure subscription via Azure CLI .</p><blockquote><strong>When you fire the command the CLI will not evaluate all errors at once. As soon as the first error is detected , CLI will throw an error message and stop.</strong></blockquote><p><strong>Error 1 :</strong></p><p>{“error”:{“code”:”InvalidTemplate”,”message”:”Deployment template validation failed: ‘The provided value for the template parameter ‘storageaccountname’ at line ‘7’ and column ‘26’ is not valid. <strong>Length of the value should be greater than or equal to ‘8’.</strong> Please see <a href="https://aka.ms/arm-template/#parameters">https://aka.ms/arm-template/#parameters</a> for usage details.’.”,”additionalInfo”:[{“type”:”TemplateViolation”,”info”:{“lineNumber”:7,”linePosition”:26,”path”:”parameters.storageaccountname.minlength”}}]}}</p><p><strong>Error 2 :</strong></p><p>{“error”:{“code”:”InvalidTemplate”,”message”:”Deployment template validation failed: ‘The provided value ‘eastus’ for the template parameter ‘storagelocation’ at line ‘19’ and column ‘30’ is not valid. <strong>The parameter value is not part of the allowed value(s): ‘westeurope,northeurope’</strong>.’.”,”additionalInfo”:[{“type”:”TemplateViolation”,”info”:{“lineNumber”:19,”linePosition”:30,”path”:”parameters.storagelocation.allowedValues”}}]}}</p><p><strong>Error 3 :</strong></p><p>{“error”:{“code”:”InvalidTemplate”,”message”:”Deployment template validation failed: ‘The provided value ‘StorageV1’ for the template parameter ‘storagekind’ at line ‘31’ and column ‘30’ is not valid. <strong>The parameter value is not part of the allowed value(s): ‘StorageV2’.</strong>’.”,”additionalInfo”:[{“type”:”TemplateViolation”,”info”:{“lineNumber”:31,”linePosition”:30,”path”:”parameters.storagekind.allowedValues”}}]}}</p><p><strong>Error 4:</strong></p><p>{“error”:{“code”:”InvalidTemplate”,”message”:”Deployment template validation failed: ‘The provided value ‘Standard_RAGZRS’ for the template parameter ‘storagesku’ at line ‘43’ and column ‘30’ is not valid. <strong>The parameter value is not part of the allowed value(s): ‘Standard_LRS,Standard_GRS’.</strong>’.”,”additionalInfo”:[{“type”:”TemplateViolation”,”info”:{“lineNumber”:43,”linePosition”:30,”path”:”parameters.storagesku.allowedValues”}}]}}</p><p>As you see, the errors are pretty self explanatory.</p><p>Let’s fix all the paramters and fire the command. Observe the highlighted values supplied to each parameter being compliant to the constraints defined.</p><pre>az deployment group create --resource-group rg-demo-arm --template-uri &quot;https://raw.githubusercontent.com/rajeshr6r/arm_templates/master/azresourcedeploywithparams.json&quot; --parameters storageaccountname=&quot;<strong>qwe4qwe4</strong>&quot; storagelocation=&quot;<strong>westeurope</strong>&quot; storagekind=&quot;<strong>StorageV2</strong>&quot; storagesku=&quot;<strong>Standard_GRS</strong>&quot;</pre><p>Now let’s fire the command and see if all goes well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*19H9prvHvaZCQ8pzKyvGvg.png" /><figcaption>Screenshot after resource being deployed in Azure with all specifications taken care off</figcaption></figure><blockquote><strong>As this is a tutorial ,with the command below let’s delete the resources we created.</strong></blockquote><pre>az group delete --name rg-demo-arm</pre><p><strong>Closing thoughts:</strong></p><p>With that , we have demonstrated how we can implement resource deployment governance with ARM Templates.</p><p>There are more complex techniques that can ensure a robust fail-safe resource deployment strategy for Azure Cloud . I’ll be covering this as part of this series. <strong>Please stay tuned to my posts .</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb1b99435bc8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/dummies-guide-to-azure-arm-templates-deployment-governance-cb1b99435bc8">Dummies Guide to Azure ARM Templates- Deployment Governance</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dummies guide to Automating Azure Deployments with ARM Templates]]></title>
            <link>https://medium.com/cloudfordummies/dummies-guide-to-automating-azure-deployments-with-arm-templates-3164193cae3b?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/3164193cae3b</guid>
            <category><![CDATA[cloudfordummies]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud-automation]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Fri, 22 Oct 2021 16:55:58 GMT</pubDate>
            <atom:updated>2021-10-26T09:05:03.975Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*g-vWzCwKI_N7P_eZ.png" /></figure><p>ARM stands for <strong>A</strong>zure <strong>R</strong>esource <strong>M</strong>anager. This article is the first of a series in Azure Deployment Automation.</p><p>ARM provides a simple and efficient way to declare Azure resources that you wish to create in your subscription in a json file and deploy them using Azure CLI.</p><p>This approach of declaring resources and deploying them programmatically is called as <strong>Infrastructure as Code.</strong></p><p>On this note, I have written an introduction to Terraform a leading open-source Infrastructure as Code tool which may want to take a <a href="https://blog.devgenius.io/why-terraform-makes-you-a-better-cloud-architect-54200065f5e1">look</a>.</p><p><strong>Too much to digest ? . Let’s take it step by step.</strong></p><p>Before we proceed further , the following are required to complete this tutorial successfully.</p><ol><li><strong>Microsoft Azure Subscription</strong> . If you are pro or a novice , it’s always good to have your own free subscription of yours to test things out. If you have still not got one, I guess its time to get one.</li></ol><p><a href="https://azure.microsoft.com/en-in/free/">Create Your Azure Free Account Today | Microsoft Azure</a></p><p>2. <strong>Azure CLI version 2.20.0 or above. </strong>Doesn’t matter if your laptop runs windows or linux . Even with windows laptops you can follow the tutorial on WSL ( Windows Subsystem for Linux ) . If you have still dont know what is WSL , good idea to take a look.</p><ul><li><a href="https://docs.microsoft.com/en-us/cli/azure/install-azure-cli">How to install the Azure CLI</a></li><li><a href="https://docs.microsoft.com/en-us/windows/wsl/install">Install WSL</a></li></ul><p>3. <strong>Docker</strong> . This is optional if you are not able to have the latest version or atleast the version (2.20.0) required to run the commands in this tutorial.</p><p>I had issues with my linux laptop where my azure cli version was stuck in 2.0.8 and was refusing to upgrade . So I went the docker way . Other than that the steps are going to be the same.</p><p>4. <strong>VS Code or similar editor. </strong>Again totally your choice. I prefer VS Code for the add-ons it provides to aid .</p><p><strong>Let’s deploy some infrastructure with code shall we ?</strong></p><p>For this tutorial I’m using a docker image of Azure CLI. If you are following this with the docker image of azure CLI , please ensure to run the docker image before firing the commands. If you have successfully installed the latest version of Azure CLI , then you can ignore the docker specific steps.</p><p><strong>Docker specific steps:</strong></p><p>a. Pull the azure cli image</p><pre>docker pull mcr.microsoft.com/azure-cli</pre><p>b. Run the azure cli image</p><p><em>Note : If you are running the azure cli on Docker you’ll need an additional step to allow the docker image to access the deployment files ( from Step 3 below )saved in local folder . The following command enables you to do that.Replace the placeholder highlighted with the correct path</em></p><pre>docker run -it -v <strong>&lt;your_local_folder_where_the_files_are&gt;</strong>:/mnt mcr.microsoft.com/azure-cli</pre><p><strong>Step 1: </strong>Check if you have azure cli installed by running the following command on your command line</p><pre>az version</pre><p><strong>Step 2: </strong>Login to your azure subscription from your cli with</p><pre>az login</pre><p>At this step you should get a confirmation as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*r7ley6lYqtEoU-6d85IUWA.png" /></figure><p><strong>Step 3:</strong> Let’s first create a resource group to group up the resources from command line</p><pre>az group create --name rg-demo-arm --location eastus</pre><p>If you have the right permissions to your subscription you should get a success message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Odezz0qd11sRmdphs8SDMQ.png" /></figure><p><strong>Step 4:</strong> Let’s create a deployment configuration file for creating a storage group.</p><p>Here I’ll be using VS Code and it’s inbuilt capabilities that aid in creating ARM Templates. If you don’t use VS Code , simply copy paste the pre-built file that I have below and proceed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f0325f7716c436c733177c28d55f1a2c/href">https://medium.com/media/f0325f7716c436c733177c28d55f1a2c/href</a></iframe><p>Creating the same file in VS Code is pretty intuitive. Create a blank file named azresourcedeploy.json and open it in VS Code.</p><p>a. Now start typing <strong>ar</strong> and you start getting suggestions . This is enabled by VS Code loading ARM Schema definitions in the background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*Wami4tP7bpAsNKERehn1iw.png" /></figure><p>A blank template looks like this and for simplicity we are only going to use <strong>parameters</strong> and <strong>resources</strong> for this tutorial .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9unPIkXp9hES5mf7gf5FBA.png" /></figure><p>b. Creating a parameter that we can use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*XXcYvW8MRdP2JnQPn5v4jw.png" /></figure><p>c. At this stage , VS Code also allows you to create a separate parameter file where you can group all your parameters . <strong>Remember , it is totally optional , however it is a best practice so one should follow it.</strong></p><p>You can also create this manually . Simply copy paste the file in your folder.</p><p><strong><em>Please take care to change the values for the paramter.</em></strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/610523afa3d46706167e997e81209eed/href">https://medium.com/media/610523afa3d46706167e997e81209eed/href</a></iframe><p><strong>Step 5:</strong> Show Time</p><p>Assuming you have both the files are ready , let’s fire the deployment command.</p><p>Before we fire the command , for those of you who are running this on docker , just a last check to ensure that the files are indeed available within the docker environment.</p><p><em>Note: This doesn’t mean the files are copied , but we are mounting the path temporarily during the time when the docker image is running.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zWjYWXe6GnCkIob9rrH83Q.png" /></figure><p>This is a very powerful technique and you can learn more about mounting volumes <a href="https://docs.docker.com/storage/volumes/">here</a>.</p><p>Let’s fire the deployment command now . Before that look at the highlighted parameters.</p><pre>az deployment group create --resource-group <strong>rg-demo-arm</strong> --template-file <strong>azresourcedeploy.json</strong> --parameters <strong>azresourcedeploy.parameters.json</strong></pre><p>At this stage , you should get the following prompt which will mean that you are all set and the resources are getting deployed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0E-NYIwYABIIyMUsxZz38g.png" /></figure><p>Once the deployment is completed you should get a message as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*0H1GkYO-GcLSFD0pSnuLPw.png" /></figure><p><strong>Step 6:</strong> Let’s verify the resources on Azure portal.</p><p><strong>Resource Group</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*01CxuOfiLdB6db2eotcvrw.png" /></figure><p><strong>Storage Account within in the Resource Group</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W94jaYKmmDYXzRqD0HnY8g.png" /></figure><p>So with that we have successfully deployed a resource to Azure subscription with Azure CLI and ARM templates.</p><p><strong>Step 7: </strong>Cleanup time.</p><p>As this is a tutorial ,with the command below let’s delete the resources we created.</p><pre>az group delete --name rg-demo-arm</pre><p>You will be prompted to confirm</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*fgDX4w4sg40sNvx-tZZGig.png" /></figure><p><strong>Closing thoughts:</strong></p><ol><li>Deployment and maintenance of Cloud infrastructure is critical to production efficiency , business continuity , disaster recovery .</li><li>ARM Templates and Azure CLI provides a way to enable versioning , standardization to resource deployment activities.</li></ol><p><strong>Similar tools for GCP and AWS</strong></p><ul><li><a href="https://cloud.google.com/deployment-manager/docs">Google Cloud Deployment Manager documentation | Cloud Deployment Manager Documentation</a></li><li><a href="https://aws.amazon.com/cloudformation/">Provision Infrastructure as Code - AWS CloudFormation - AWS</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3164193cae3b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/dummies-guide-to-automating-azure-deployments-with-arm-templates-3164193cae3b">Dummies guide to Automating Azure Deployments with ARM Templates</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Local Azure Storage Emulation with Azurite and Azure Functions — A Dummies Guide]]></title>
            <link>https://medium.com/cloudfordummies/local-azure-storage-emulation-with-azurite-and-azure-functions-a-dummies-guide-53949f0c1f44?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/53949f0c1f44</guid>
            <category><![CDATA[cloudfordummies]]></category>
            <category><![CDATA[azurestorageemulator]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Sat, 14 Aug 2021 06:11:36 GMT</pubDate>
            <atom:updated>2021-08-14T06:08:21.977Z</atom:updated>
            <content:encoded><![CDATA[<h3>Local Azure Storage Emulation with Azurite and Azure Functions — A Dummies Guide</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t8iYalN1J9iQxWXk" /><figcaption>Azure</figcaption></figure><p>If you work with Azure Storage events, you are in the right place. This article is not about the different classes of storage , but how to emulate them locally with Azurite. We will be emulating Azure storage locally to test events (functions ) triggered by Azure storage types .</p><p>Azurite currently supports Blob , Queue and Table storage emulation . If you are new to Azure Storage , it will be helpful to give a read to the article below.</p><p><a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-introduction">Introduction to Azure Storage - Cloud storage on Azure</a></p><p>If you are new to Azure Functions , you may consider reading my other articles on Azure Functions.</p><p><a href="https://medium.com/analytics-vidhya/azure-functions-for-dummies-part-1-http-trigger-a95cd000bc62">Azure Functions for Dummies — Part 1 — http trigger</a></p><p>Alternatively, you can also check out my <a href="https://medium.com/cloudfordummies"><strong>medium publication</strong></a><strong> </strong>for more articles on Azure Functions.</p><h3><strong>First things first</strong></h3><p>Before proceeding further we need some tools ready in your laptop. I run Linux and even for Windows mostly the steps are the same except for Docker installation sometimes ( in older Windows 10 versions Docker support is not too great ) .</p><ol><li>Docker (<a href="https://docs.docker.com/docker-for-windows/install/">Docker Installation for Windows</a> , <a href="https://docs.docker.com/engine/install/ubuntu/">Docker Installation for Linux</a> )</li></ol><p>2. <a href="https://azure.microsoft.com/en-in/features/storage-explorer/">Azure Storage Explorer</a></p><p>3. <a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=linux%2Ccsharp%2Cportal%2Cbash%2Ckeda">Azure Functions Core Tools</a></p><p>4. Python ( as I prefer Python ) .</p><p><strong>Note :</strong></p><ol><li><strong>If you are comfortable with another language you may have to go your way after step 4. Only steps 1 to 3 are critical in setting up the local storage emulation infrastructure. The remaining are standard Azure Function setup and development related.</strong></li><li><strong>Using VS Code makes a life a lot easier dealing with Azure Resources. However , its totally a personal opinion. You can replicate these steps with any of your favorite Code Editor.</strong></li></ol><p><strong>In fact in this article , I’m not going to use VS code to run the functions and stick to command line .</strong></p><p>Assuming you have setup your environment lets get cracking.</p><h3><strong>Steps</strong></h3><ol><li><strong>Download the Azurite Docker image</strong></li></ol><pre>docker pull mcr.microsoft.com/azure-storage/azurite</pre><p>After this when you run the following command you should be able to see the docker image.</p><pre>sudo docker image ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rO5nR71sSm-HVjWcLH7eOA.png" /></figure><p><strong>2. Run the Docker image</strong></p><pre>docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 \<br>    mcr.microsoft.com/azure-storage/azurite</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tI0mx1ZYWGFZKchSRwOEug.png" /></figure><p>Now observe the output carefully . You will see that each service Blob , Queue , Table is associated with a dedicated port.</p><p>If you are looking to run a specific type of storage you can try this command</p><pre>docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite \<br>    <strong>azurite-blob --blobHost 0.0.0.0 --blobPort 10000</strong></pre><p>Just the change the highlighted parts to the relevant storage type such as <strong>queue or table</strong> and proceed.</p><p><strong>3. Configure the Storage Emulator</strong></p><p>Your Azure Storage Emulator application has a startup page like this. Click on the “plug” icon to get the connect manager</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/41/1*q0T8jYMsIEu_qoPvKfZr6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*Q9ymVbCDVvDzJaPKVSTwGQ.png" /></figure><p>Click on Local Storage Emulator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*rD17d70QcXIDyfm3Gh1NmQ.png" /></figure><p>Just the name the connection as “Azurite” and leave everything default (<strong> unless you made a change when you started the docker container</strong> ) and hit next .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*nT03GXS2rMANtNxayYMGlg.png" /></figure><p>Now you should your Azurite Storage Emulator visible</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/1*8TA33fySVulLOh51n2g_xg.png" /></figure><p>Now you have successfully configured your local storage emulator. Let’s test this quickly.</p><p>To test this I’m going to create a simple Queue trigger with Azure Functions.</p><p>Before doing that, I’m going to create a queue called “<strong>test-local-queue</strong>” in my storage emulator window.</p><p>Simply , right click the Queues and “Create a queue”. Remember to use the same name or at the least any name without underscores. Azure Storage naming conventions are to blame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*uqHkaA7ikc7EM-jyEVdvzA.png" /></figure><p>Before proceeding further, you might see some interesting logs getting generated by the docker image that we started. They are simply logs for actions that we did in the storage emulator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*ryHhhKbWFfdYbUjs0gXUzQ.png" /></figure><p><strong>4. Create a Queue trigger function</strong></p><p>I have covered Queue trigger functions in detail in the article below which deals with Cloud storage.</p><p><a href="https://medium.com/analytics-vidhya/azure-functions-for-dummies-part-2-azure-queue-storage-trigger-d82e899a01cf">Azure Functions for Dummies — Part 2— Azure Queue Storage trigger</a></p><p>But for the benefit of this tutorial , let’s create one quickly “locally”. I’m going to use command-line with Azure Functions Core tools .</p><p>Let’s start</p><pre>func init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*QbMVGD7PJIBLg04D6Q5dXQ.png" /></figure><p>And select the option 4 ( as I’m using Python ) . If you are comfortable with another language you may want to choose the relevant option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*ozxGiFqcoVXi70tNAX_6cA.png" /></figure><p><strong>Now we have the function boilerplate code created .</strong></p><p>Let’s create a queue trigger function now with the following code and <strong>select option 12 </strong>for queue trigger</p><pre>func new</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*d6gQVIrOFiqegNv8X8Mk6g.png" /></figure><p>I named the function as <strong>test-local-queue-trigger</strong> as a reminder to the queue that I created in <strong>Step 3</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*iq863eIFKqplDw23RGbJvA.png" /></figure><p>Let’s make some changes to the queue function and test the trigger.</p><p>Before we proceed further , I’d like to show the folder structure created as part of the steps above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*yeVpCUoXS0rv9W-IpMWYPg.png" /></figure><p><strong>5. Edit the localsettings.json </strong>in the functions app</p><p>The default boiler plate code looks like this. We are going to add a couple of items here</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*-znMtzyZTU3zH8Aydo-Pvg.png" /></figure><p>Use the following . But before that let’s observe that we have used the values <strong>“UseDevelopmentStorage=true” . </strong>This let’s the function run-time where to look for events.</p><p>Also, look at the QueueConnectionString that I have created. I’m going to use it in a short while.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a663ff3797d3349a4319a7eb931351ad/href">https://medium.com/media/a663ff3797d3349a4319a7eb931351ad/href</a></iframe><p>First let’s understand how to obtain the <strong>Connectionstring</strong>. It’s simple . It’s available in the Storage Emulator.</p><p>Look at the Primary Connection string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*AjY16LdojyypNeTzRHjL2A.png" /></figure><p>Let’s observe the connection string a bit and the highlighted ones</p><pre>AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;<strong>BlobEndpoint=</strong><a href="http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1"><strong>http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1</strong></a><strong>;</strong></pre><p><strong>6. Edit the function.json </strong>in the function to tell the function which queue it should look for</p><p>Default Settings look something like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*OTdIM_2drRoYbWuILz747Q.png" /></figure><p>Change the queueName to <strong><em>“test-local-queue”</em></strong><em> </em>and save the file.</p><p><strong>7. Let’s test the Queue trigger by running the function in command line</strong></p><pre>func start</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*xtLJb3qUEH8RCyeYlWpfDg.png" /></figure><p>You’ll also see a lot of action happening in the docker image .</p><p>Don’t worry about the warning message on “connection” property . We have already set it up in the <strong>localsettings.json .</strong></p><p><strong>Let’s put a message in the queue</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*Lp8PSi7o46eD8MfGb2P95A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6jxBjW-Mtk9HUyWQcAKyYw.png" /></figure><p>As soon as you insert the message , you can see the message getting processed in the command line with as the function has triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Je84ysKVQZjC0EyqCmttOw.png" /></figure><p>And that’s how you emulate a Queue Storage with Azurite locally.</p><p>As with Blob storage and Table storage , the process is really simple and identical to that of a queue storage.</p><p>Steps you need to remember to replicate is to pick the right type of function trigger and link the function trigger to the blob / table created in the local storage.</p><p>I hope you liked it and found all the minor details you need to test Azure Storage emulation with Azure Functions .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53949f0c1f44" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/local-azure-storage-emulation-with-azurite-and-azure-functions-a-dummies-guide-53949f0c1f44">Local Azure Storage Emulation with Azurite and Azure Functions — A Dummies Guide</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Telegram Bot for Cowin Shot Slots]]></title>
            <link>https://medium.com/cloudfordummies/building-a-telegram-bot-for-cowin-shot-slots-9b15355c5b8e?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/9b15355c5b8e</guid>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[vaccination]]></category>
            <category><![CDATA[telegram-bot]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[cloudfordummies]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Thu, 13 May 2021 15:17:28 GMT</pubDate>
            <atom:updated>2021-05-13T15:13:10.230Z</atom:updated>
            <content:encoded><![CDATA[<p>Cowin Shot Slot availability chase has become an extremely competitive space with the gap in supply and demand in India . Several techies are doing their best to educate and empower people with one of the largest vaccination drive in the world’s 2nd most populous country.</p><p>Here is my recipe to provide timely alerts to those in search for a CoWin slot .</p><p>Assumptions: I assume you have some idea about oth AWS Lambda , Python programming and Telegram to proceed further.</p><h3><strong>Remember to read the last section of this article</strong></h3><p><strong>Architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*XOx1N3U-yi1GmGAXlHMF3w.png" /><figcaption>Architecture</figcaption></figure><p>I was motivated to use AWS Lambda given the simplicity of deploying the code and being able to scale up and scale down .</p><p>Telegram was my choice to broadcast the messages given the flexibility it has in creating a bot , channel and the “200,000” subscribers limit to any broadcast channel you create. That’s convenient.</p><p><strong>Step 1: Bot Creation with Telegram</strong></p><p>If you have not already signed up for Telegram , I think its time you do one . Proceed after you have created your Telegram ID and signed up.</p><p><strong>Telegram provided the ultra-simple way to create your own bot . You can chat with “@botfather“ a specialized Telegram Bot that can assist you .</strong></p><p>First , open up your Telegram app on phone and search for “ <strong>@botfather </strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*tJ1gbmxVRf_e_ok7s-in5w.png" /><figcaption>botfather</figcaption></figure><p>Click “Start” to communicate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*NKY8h1TGOJl9ptdC86loDA.png" /><figcaption>communicated started with botfather</figcaption></figure><p>Now we want to create a newbot . Use the command “/newbot” and proceed with the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*zgN5NTQZtTyaPsEQefE3oA.png" /></figure><p>Ensure the following.</p><p>a. Select a unique name for your bot</p><p>b. Get the Authorization token ( save it some where we need it shortly )</p><p>c. Set up a Description for your bot</p><p><strong>Step 2: Channel Creation with Telegram</strong></p><p>A Bot account can be used to respond to messages ( essentially reply ) . However that’s not convenient if we have to transmit messages to large audience . In such situations it’s useful to use “Channels” . So let’s create one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*1EI-Ds6CP0GpJZVNBGDh8A.png" /><figcaption>New Channel</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*y80kZN5kKUL1HqFUD0YFvg.png" /></figure><p>Name your Channel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*y80kZN5kKUL1HqFUD0YFvg.png" /></figure><p>Once the channel is created , you need to add the Bot created in step 1 as an administrator to enable sending broadcast messages .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*fpvIVA97f21gFAH8rlD3nQ.png" /></figure><p>It’s such a good idea to limit the rights the bot will have for this channel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*jGBnO3HuYe5cEiil9b-yXw.png" /></figure><p><strong>Step 3: Create Lambda Function</strong></p><p>I’m not going to deep dive about how to create the Lambda Function .</p><p><strong>Note </strong>: The script I have provided may not be the most optimized one . I have purposefully left it generic for customization . Please feel free to use it as you please.</p><p><strong>Things to note while creating the Lambda Function</strong></p><ol><li><strong>Ensure to create your Lambda Function in ap-south-1 “Mumbai Region”</strong></li><li><strong>Ensure to keep your execution trigger to not exceed 100 API calls within a 5 minute interval .</strong></li></ol><p><strong>The lambda function has 2 critical steps</strong></p><p>a. Fetching data from the Cowin API for the district / districts defined in the districts variable ( lines 15–48 )</p><p>b. Broadcasting the message to Telegram . ( lines 57–74 )</p><p>Observe that in line 67 I’m invoking the Telegram API with the botapikey (parameter botapikey ) from step 1 and the channel ID ( parameter chatid ) from step 2 and the message to be transmitted ( which is essentially the records that i fetched from the Cowin API )</p><p>url = f”https://api.telegram.org/{<strong>botapikey</strong>}/sendMessage?chat_id={<strong>chatid</strong>}&amp;text={<strong>finalmessage</strong>}&quot;</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d3d124f7d6fdc95149a163d56e6cb5e7/href">https://medium.com/media/d3d124f7d6fdc95149a163d56e6cb5e7/href</a></iframe><p><strong>Step 4: Schedule the Lambda Function</strong></p><p>For this I’m using AWS CloudWatch .</p><p>Click on Rules</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*fWBrPBdHVX5cI1yiTLP0_A.png" /></figure><p>Create a New Rule</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*PJR6BvyG3rRkD5iAqhYU2w.png" /></figure><p>Use a Cron Expression here to specify how frequently you want to run the function. Other considerations such as concurrency , scaling can be done at the Lambda function window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*yXkTSCECmgCqh-Aj7KOb0A.png" /></figure><p>Use Crontab.guru if in doubt .</p><p><a href="https://crontab.guru/">Crontab.guru - The cron schedule expression generator</a></p><p>My Bot is broadcasting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*_ikJqHaHTBM5-XEKAjPtWg.png" /></figure><p><strong>Strategy Points to keep in mind :</strong></p><ol><li>The same approach is being used by several tech enthusiasts to provide customized updates . And this means the Cowin API Server is taking a lot of hits.</li><li>Avoid throttling your requests to the API . You may end up getting blocked interim.</li><li>Set your schedule for fetching the API sensibly. Sometimes the data can be in cache and upto 30 minutes old ( refer to the API Documentation )</li><li>If possible group with other like minded enthusiasts to narrow down your scope of search like a particular district , city , pincode whatever it is .</li><li>Respect fair use policies of all the involved technologies such as AWS , Telegram , API Setu . It’s a beautiful thing that almost all of these services are free of cost . Let’s respect that and dont get greedy with it.</li><li>Secure your bot API Keys with environment variables to avoid bot ID getting misused.</li></ol><p>If you come across a suggestion , alternative approach , help please shout out. Glad to help .</p><p>Inspiration :</p><p>Berty Thomas on Twitter : @BertyThomas</p><p>Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b15355c5b8e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/building-a-telegram-bot-for-cowin-shot-slots-9b15355c5b8e">Building a Telegram Bot for Cowin Shot Slots</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 10 things you probably did not know about Azure]]></title>
            <link>https://medium.com/cloudfordummies/top-10-things-you-probably-did-not-know-about-azure-cloud-1adbef1dcbe7?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/1adbef1dcbe7</guid>
            <category><![CDATA[cloudfordummies]]></category>
            <category><![CDATA[azure-services]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Fri, 07 May 2021 06:39:46 GMT</pubDate>
            <atom:updated>2021-05-07T06:52:33.846Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/526/0*cRQxJXXdoxsEpeYH.png" /></figure><p>And if you are aspiring to a Azure Certified professional, its worth going through this article.</p><ol><li><strong>There’s a TCO Calculator.</strong></li></ol><p>Nope . Not the pricing calculator . The TCO Calculator. Whats the difference ?</p><p><strong>Pricing Calculator:</strong></p><p>Allows you to estimate the pricing of commisioning and running a resource on cloud .</p><p><strong>TCO Calculator:</strong></p><p>Provides you an estimated cost of ownership of your hardware. Assuming that you want to migrate your workload to Cloud and wanted to know the estimated you can use this .</p><p>It provides a detailed breakdown by various heads including one on “Electricity” savings . Those of you know the lengths that we go to manage power up of our Data centers will appreciate the fact .</p><p><a href="https://azure.microsoft.com/en-in/pricing/tco/calculator/">Total Cost of Ownership (TCO) Calculator | Microsoft Azure</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gdfue0RjSmqwDEPMyWF-9g.png" /></figure><p><strong>2. Powershell can be used on Linux too.</strong></p><p>This really threw me off guard . I’m a Linux person and have stuck to Azure CLI on bash( the command prompt alternative of Windows on Linux ) . I always thought Powershell scripts can be executed only on Windows machines . That’s not true.</p><p><a href="https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-5.9.0">Install the Azure Az PowerShell module with PowerShellGet</a></p><p>If you have a situation to manage a lot of Powershell scripts and are using a macbook or a linux laptop , fret not you are still covered.</p><p><strong>3. Azure China is not operated by Microsoft</strong></p><p>When it comes to Azure , we always thought the physical infrastructure , hardware , networking and the entire data center is being managed by Microsoft . Nope . That’s not true . Azure China is an exception.</p><p>So if you are looking for implementing your solution for China and its geographies , you have better chances considering Azure China to comply with the regulatory requirements surrounding your implementation than any other region.</p><p><a href="https://docs.microsoft.com/en-us/azure/china/overview-operations#:~:text=Microsoft%20Azure%20operated%20by%2021Vianet%20(Azure%20China)%20is%20a%20physically,Cloud%20Technology%20Co.%2C%20Ltd.">Microsoft Azure in China</a></p><p><strong>4. Not all Regions have availability zone options.</strong></p><p>High Availability and Fault-tolerance and critical to cloud. Every Cloud Provider strives to deliver this with a network of availability zones which boast one ore more data centers within an availability zone and have multiple availability zones within a region.</p><p>However not all geographies / regions have this option . You will have only one Availability Zone in the entire African Continent.</p><p><a href="https://docs.microsoft.com/en-us/azure/availability-zones/az-region">Azure Services that support Availability Zones</a></p><p>In the highly un-likely event of an outage in Africa AZ and you have a constraint to not have any AZ outside of Africa your application your application is going to go down. Period.</p><p><strong>5. Not All Azure Services are available in all regions</strong></p><p>Wait. What ???? . Refer to this table before considering an Azure Service and an Azure Region combination.</p><p>You may be able to use the service in a different region , but that comes with its own set of constraints such as costs involved in data transfer between region ( its not free ) , Regional / Geographical Data Privacy regulations such as GDPR by EU . Given the goals of Cost-Efficient , Secure , Scalable and what not of the cloud you better verify this table to ensure your architecture is valid.</p><p><a href="https://azure.microsoft.com/en-in/global-infrastructure/services/?products=all">Azure Products by Region | Microsoft Azure</a></p><p><strong>6. Azure Government</strong></p><p>Azure provides an exclusive Region called Azure Government and its only available to the US Government or a US Government Entity . And the exact physical locations of the datacenters , Availability Zones for this region are a secret atleast to outsiders. <strong>Area 51 types ?!!!!</strong></p><p><strong>7. Azure Functions provide better connectivity to SQL Server than AWS Lambda</strong></p><p>This might not be surprising to you . But if you are still let me explain.</p><p>Connecting to an SQL Server via ODBC connectivity from a linux machine is not always straight forward . Added to this is the limitation of the image that is used by your serverless infrastructure to execute your code. Whether it is AWS Lambda or Azure Functions when you commission a piece of code to be triggered on an event , then under the hoods a “tiny” OS Image runs up as a container and your code is executed within this container.</p><p>So if you need to connect to an SQL Instance you need to have the ODBC drivers available in this environment and Azure Functions beat AWS Lambda hands down . I have had the situation having the same function tested in AWS Lambda first and failed miserably to only find out that it ran like a breeze in Azure Functions .</p><p><strong>8. VS Code loves Azure</strong></p><p>No brainer for Microsoft developed VS Code. I have worked across GCP , AWS and Azure and have seen the most comprehensive coverage of extensions for Azure Cloud Infrastructure management. Whether you are a developer , Solution Architect , Administrator you got it . Just fire up VS Code and search for an extension and voila you are ready to go . No more CLI commands , Powershell syntaxes .</p><p>Some stuff I use on a daily basis . I also have installed extensions for Container Registry and Storage and they are available on a different tab . But you get the point .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*O1dZFWoJr0fjnoxELTaoVQ.png" /></figure><p>9. <strong>Azure Devops</strong></p><p>Azure Devops is Azure’s Continuous Integration and Continuous Development Framework for building high-quality Software products . Irrespective of whether you are using Azure Cloud , Devops is a great offering by Azure for CICD Pipelines , Repositories , Artefacts , Collaboration , Bug Tracking . Just to name a few . Given the tight integration it has with Azure , things are so simple if you are running your Cloud Infra on Azure.</p><p><a href="https://azure.microsoft.com/en-in/services/devops/">Azure DevOps Services | Microsoft Azure</a></p><p><strong>10. Azure Certfication renewals are free.</strong></p><p>Wait. Don’t hit the link already.This is a recent announcement. If you already have a certification then the renewal is free . Follow the links below.</p><p><a href="https://docs.microsoft.com/en-us/learn/certifications/renew-your-microsoft-certification">https://docs.microsoft.com/en-us/learn/certifications/renew-your-microsoft-certification</a></p><p><a href="https://techcommunity.microsoft.com/t5/microsoft-learn-blog/stay-current-with-in-demand-skills-through-free-certification/ba-p/1489678">https://techcommunity.microsoft.com/t5/microsoft-learn-blog/stay-current-with-in-demand-skills-through-free-certification/ba-p/1489678</a></p><p>If you know anything that I may not have covered in this list , please do drop a note.</p><p>Consider following me on Medium for practical how-tos , check lists , cheat-sheets on everything cloud .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1adbef1dcbe7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/top-10-things-you-probably-did-not-know-about-azure-cloud-1adbef1dcbe7">Top 10 things you probably did not know about Azure</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Dummies Guide tutorial to AWS SQS]]></title>
            <link>https://medium.com/cloudfordummies/a-dummies-guide-tutorial-to-aws-sqs-b3431ad7be1d?source=rss----5d339637b0c---4</link>
            <guid isPermaLink="false">https://medium.com/p/b3431ad7be1d</guid>
            <category><![CDATA[cloudfordummies]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[messaging-system]]></category>
            <category><![CDATA[sqs]]></category>
            <dc:creator><![CDATA[Rajesh Rajamani]]></dc:creator>
            <pubDate>Wed, 17 Mar 2021 15:13:25 GMT</pubDate>
            <atom:updated>2021-03-17T15:13:07.273Z</atom:updated>
            <content:encoded><![CDATA[<p>This is part of my Dummies Series on AWS .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*-zZ3z2blYGcCi-FGPGYP_g.png" /><figcaption>AWS SQS Logo</figcaption></figure><p>Hope you followed my part 1 of this 2-part series on SQS. If you have not already , I recommend you take a look at it here.If you already have an idea about Messaging Queues and want to get hands on with SQS on AWS , let’s get going.</p><p><a href="https://medium.com/cloudfordummies/a-dummies-guide-to-sqs-with-mcdonalds-9d2ac0248e6f">A Dummies Guide to SQS with McDonalds</a></p><p>By the end of this article , you should have a good understanding on</p><ol><li>How to implement a standard Queue on SQS along with Dead-Letter-Queue</li><li>Understand how to publish a message from console , SNS (another AWS Service ) to SQS . If you have not already come across SNS I have covered that in another article for your reference.</li></ol><p><a href="https://medium.com/dev-genius/a-dummies-guide-to-using-aws-sns-for-your-business-case-f3ed240687e9">A Dummies Guide to using AWS SNS for your business case</a></p><p>Often, there is confusion between when to choose SNS or SQS . A simple decision making process for this .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*7v1NKMXSIldSlPUNUM9Kcg.png" /></figure><h3>Let’s get started</h3><p>Prerequisites:</p><ol><li>An AWS Account</li></ol><h4>Step 1:</h4><p>Locate SQS on AWS console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*hMI4EUx_cM4xZ4yE3-aQqg.png" /></figure><h4>Step 2:</h4><p>Click on Create Queue</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*POUqboG7ho7A4N3UVepbIA.png" /></figure><h4>Step 3:</h4><p>Configure the queue . Select “Standard” queue for this tutorial. You can also try “FIFO”queue later on to experience the changes in message handling influenced by this selection.</p><p>Set the name as “<strong>MyStandardSQSQueue</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVkQRv1y_BVjuKzHeL-bQg.png" /></figure><p>Additional configuration settings . Pay attention to the message size , retention period ,visibility timeout . These are going to be useful in later steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6LE6Fi2fincmucM1nXgQXA.png" /></figure><p>Scroll down further and for now setup the Dead-letter queue to be disabled. We will come back later to this setting. Hit “Create queue”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*njYq4Ju-39sj1eVj_LbY7w.png" /></figure><p>Now you should see the queue ready.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O2NU2M8Ob39PpXok6lBuyQ.png" /></figure><h4><strong>Step 4:</strong></h4><p><strong>Now repeat Steps 1 through 3 to create another queue called</strong> <strong>“MyStandardSQS_DLQ”</strong></p><p>Link the Dead-Letter queue created above to the original queue “<strong>MyStandardSQSQueue” by editing the queue with the edit option</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-etqJia81MXynDb6OmtzQ.png" /></figure><p>Select the Dead-Letter queue ( your queue shows up in the option ).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*bxUmkflEDu2czeR8UVaZrA.png" /></figure><p>Also set the Max-Receives property while you are editing the Dead-Letter queue property for your queue .</p><p><strong>Why is this important ?</strong></p><p>Because this determines when a message needs to be moved to the Dead-Letter queue.After 10 attempts of a message landing in your base queue , it will be automatically moved to the Dead-Letter queue</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*A6lvUP_06k6YI3-g68d2iA.png" /></figure><h4>Step 5:</h4><p>A quick verification of all the settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G98Aj_XcMNdP96E0VwbKww.png" /></figure><h4>Step 6:</h4><p>Let’s now take a look at the integrations that you can enable for your SQS queue which lies in the SQS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lHH1dTeWEX4u1UhAjFUHdg.png" /></figure><p>I have an SNS subscription integrated to my SQS as a <strong>“Publisher”. Try to remember the role of a publisher here.</strong></p><p>This step is not mandatory and you can simply publish message to the queue from the console ( which we will see in the subsequent steps ). But it will be a good idea for you to understand how messages are being published by an integration such as SNS . To know more about SNS , please read my article<a href="https://medium.com/dev-genius/a-dummies-guide-to-using-aws-sns-for-your-business-case-f3ed240687e9?source=your_stories_page-------------------------------------"> here</a>.</p><p><strong>Often, SNS and SQS are coupled in architecture design . However it is not necessary to couple SNS and SQS . Both of these services can function independently without each other.</strong></p><h4>Step 7:</h4><p>Let’s publish a message from console.Hit the <strong>“Send and Receive Messages” </strong>button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LS1Z3YOcTYXI53bq0oQqXA.png" /></figure><p>Add message details . Observe the Message Attributes . We can access these when the message is received in the queue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*txhoY1VPf2l9INpQNZ2ZDQ.png" /></figure><p>Hit “Send Message” to get the confirmation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0QpR29k6KcJ2KzTPbvNuVA.png" /></figure><p>Now, hit the View Details to see the message details. Take note of the ID ( unique ID for the message you <strong>published</strong> to the queue )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*Cizqnw3hyCbdelE0mweQwA.png" /></figure><h4>Step 8:</h4><p>If you scroll down on the same page immediately you’ll see the following panel which does not shows the message that you just sent . Why ?. Remember the visibility parameter that we had set in Step 3 at 30 seconds. So any message sent to this queue will be visible in the queue only after 30 seconds. This timeout enables <strong>subscribers</strong> to avoid duplicate processing of the same message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7tp3cZ4d7CIgEoHwioC4Xw.png" /></figure><h4>Step 9:</h4><p>Polling for messages. You should see the message you sent a while ago.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B_sc9p8cCSRGlHQswUsxhg.png" /></figure><h4>Step 10:</h4><p>Now click on the message to see more details . <strong>Observe the metadata</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*o3RrePwbfcPdIct3abrUaQ.png" /></figure><p><strong>Observe the message attributes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*XrSHvII1BebxC1gicFfOUw.png" /></figure><p>If you don’t want to test a message being published from SNS , you can skip to <strong>Step 13 </strong>else continue.</p><h4><strong>Step 11:</strong></h4><p>Quickly locate SNS to see that your SQS queue is being added as a <strong>subscriber</strong> to the SNS Queue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DfHj9z8ughIzh5ivY0wBiA.png" /></figure><p>You can click on the Subscription and publish a message to SQS now via SNS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Ld2soTUUNYcgXipkNWdTw.png" /></figure><p>Set attributes to the message being published from SNS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*la0StVk4CBARHQPFIO0b8w.png" /></figure><h4>Step 12:</h4><p>Verify the message <strong>published by SNS</strong> is received by the <strong>subscriber SQS</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4NnhY8cDhEmrFIKpvQM4ng.png" /></figure><p>Take a look at the message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*i2lnQiijZv08aLtqTXFWcQ.png" /></figure><p><strong>Step 13:</strong></p><p><strong>It’s time to test the Dead-Letter-Queue.</strong></p><p>Since we do not have a scenario of message processing failure , l<strong>et’s emulate it using the Poll Message function</strong>. When the queue is being polled ( checked for any existing messages ) messages that are still in the queue get their <strong>“Received Count” incremented.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3YVEXzT26DuFltKFxz_-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TVtNihyem9SWM_L8XxcfGg.png" /></figure><p>And , by now you would have guessed where is this “Received Count” being used. Yes !! the setting “Max Receive Count” we did on Step 4.</p><p>By hitting the Poll for messages more than 10 times makes the message disappear from the queue <strong>MyStandardSQSQueue </strong>and pushes them to <strong>MyStandardSQS_DLQ . Quickly go to the DLQ and check . And there you see the message .</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j3i9c2Em-vqZtloNx_nmRg.png" /></figure><p><strong>Parting thoughts:</strong></p><p>SQS provide a robust , scalable message queuing system that can enable us to de-couple applications to off-load heavy compute processing handled without affecting the overall system performance.</p><p>If you are interested in more Dummies guide , check out my other articles</p><p><a href="https://rajesh-r6r.medium.com/">Rajesh Rajamani - Medium</a></p><p>Alternatively , you can follow my publication for more such articles covering Azure,AWS and GCP.</p><p><a href="https://medium.com/cloudfordummies">CloudForDummies</a></p><p>Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3431ad7be1d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudfordummies/a-dummies-guide-tutorial-to-aws-sqs-b3431ad7be1d">A Dummies Guide tutorial to AWS SQS</a> was originally published in <a href="https://medium.com/cloudfordummies">CloudForDummies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>