<?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"><channel><title><![CDATA[Nans' blogs]]></title><description><![CDATA[This is actually more a notepad than anything else, you will discover the notes I take during some trainings, or while reading some books. Sometimes I write in English, sometimes in French, sometimes both at the same time, sorry about that ! (🇬🇧/🇫🇷)]]></description><link>http://nans-dumortier.com</link><generator>GatsbyJS</generator><lastBuildDate>Mon, 13 Feb 2023 15:55:49 GMT</lastBuildDate><item><title><![CDATA[Software development Interview questions]]></title><description><![CDATA[⭐ What is testing in software development ? ⭐⭐ What is dependency injection ? What does it enable ? What is a micro-service architecture…]]></description><link>http://nans-dumortier.com/Interview/software-development/</link><guid isPermaLink="false">http://nans-dumortier.com/Interview/software-development/</guid><pubDate>Fri, 27 Jan 2023 18:35:00 GMT</pubDate><content:encoded>&lt;p&gt;⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is testing in software development ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is dependency injection ? What does it enable ?&lt;/li&gt;
&lt;li&gt;What is a micro-service architecture ? What is it used for ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is Dependency Inversion Principle (DIP) ?&lt;/li&gt;
&lt;li&gt;Describe an example of clean architecture.&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Face à la complexité de la crise environnementale, il faut faciliter les prises de décision]]></title><description><![CDATA[Le climat se dérègle, ce n’est plus un débat. On a aussi des problèmes de disponibilité des ressources fossiles, de dérèglement de la…]]></description><link>http://nans-dumortier.com/environmental-footprint/</link><guid isPermaLink="false">http://nans-dumortier.com/environmental-footprint/</guid><pubDate>Mon, 10 Oct 2022 09:35:00 GMT</pubDate><content:encoded>&lt;p&gt;Le climat se dérègle, ce n’est plus un débat. On a aussi des problèmes de disponibilité des ressources fossiles, de dérèglement de la biodiversité, de disponibilité de l’eau … Ça commence à faire beaucoup d’infos à digérer.&lt;/p&gt;
&lt;p&gt;Une fois qu’on a choisi d’agir pour les causes environnementales, par où commencer ? Comment peut-on prioriser nos actions ?&lt;/p&gt;
&lt;p&gt;Sans prétendre répondre complètement à ces questions, je partage ici un morceau de cheminement.&lt;/p&gt;
&lt;p&gt;Je vais principalement prendre des exemples liés au monde de l’agro-alimentaire, parce que c’est le domaine que je connais le mieux.&lt;/p&gt;
&lt;h2&gt;On améliore ce qu’on mesure&lt;/h2&gt;
&lt;p&gt;Pour vérifier qu’on fait bien quelque chose, en général, on prend des mesures, et ensuite on s’adapte. C’est comme ça que fonctionne un régulateur de vitesse, il mesure la vitesse à un instant T, puis il demande au moteur d’adapter sa cadence en fonction de ce qu’il mesure.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/ef002385a4fb8ec8a4a6eb2fa9efcb42/73b94/image.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 34.45945945945946%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAIAAACHqfpvAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA2klEQVQY022QC46DMAxEuf8l21WBLgHyj+MEEnYgq6qqKj1Ziu2xJ+6kpdWGxmIDpcx5iymnbZfuLHHeY0vm7ewx/tXfCeXGRT1XDYZF5W3nGI21pdRZn6XjOEIgZi61/kozzOrnOaN5UrZTPr5jiU1gjPcxt4wjdpSApWSI4e42Ch1Y+/gplj4uJvSzVJ6luzIO0EXUnoX2ELfSpxisluDtkjUN/c91cJFwAtwlpg1GvoixvBfqNkz3USD2YsUs8JhQ4VKK0qbWikt+EYPzSy/entgGDTYj4jR/Q8GORIHRQIUAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image.png&quot;
        title=&quot;image.png&quot;
        src=&quot;/static/ef002385a4fb8ec8a4a6eb2fa9efcb42/fcda8/image.png&quot;
        srcset=&quot;/static/ef002385a4fb8ec8a4a6eb2fa9efcb42/12f09/image.png 148w,
/static/ef002385a4fb8ec8a4a6eb2fa9efcb42/e4a3f/image.png 295w,
/static/ef002385a4fb8ec8a4a6eb2fa9efcb42/fcda8/image.png 590w,
/static/ef002385a4fb8ec8a4a6eb2fa9efcb42/efc66/image.png 885w,
/static/ef002385a4fb8ec8a4a6eb2fa9efcb42/73b94/image.png 1004w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Schéma du principe de mesure et de rétro-action d’un régulateur de vitesse&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Grosso modo, ça ressemble à ça.&lt;/p&gt;
&lt;p&gt;En principe, on peut essayer de contrôler n’importe quelle grandeur avec ce genre de système. C’est comme ça qu’on peut faire un métro automatique, ou même qu’on commande les pales d’un hélicoptère.&lt;/p&gt;
&lt;p&gt;Après cette petite aparté technologique, revenons au sujet qui nous intéresse. Est-ce qu’on peut mesurer un impact environnemental ?&lt;/p&gt;
&lt;p&gt;Évidemment, tout le monde connait l’empreinte carbone. Les plus habitués de cette notion connaissent même les subtilités du “CO2 équivalent”, avec la prise en compte des différents gaz à effet de serre.&lt;/p&gt;
&lt;p&gt;On peut même comprendre ce que ça représente avec des simulateurs proposés par l’ADEME comme &lt;a href=&quot;https://datagir.ademe.fr/apps/mon-convertisseur-co2/&quot;&gt;Mon convertisseur CO2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Mais si on ne mesure que l’empreinte carbone, on oublie tout le reste ! Est-ce qu’il vaut mieux limiter son empreinte carbone mais aggraver son empreinte eau ?&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/00853f394c43f79edf36be7efe935c9a/70ad2/188bf389-b38c-4029-b27b-b4de0e2cfa66_image.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 51.35135135135135%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABoElEQVQoz42SX0/aUBiH+8HdTHaxD7DFJXMJInPZlRovvFmyqPSPtOUQAyxhozgXgkdoAUVFC5Rnb2FbGHpBkyf95T09z3nfkxqtqza63Sao19nNZtjf3mIvJZdlN/Oew0/bHJkupl/GURXsoqD+INlR1dla1O1x0elipDJ9qSlXS7zJrLOx9Yp3wtvNl3w++EjzmyIe3pMkU54+89p0On+3+jcYN4Nbon6XeqmK+yKHuZ7jZC3L6eY+7bBDnCxsl40zFrOQ/BX2RPgYx+gr6VCd8WHtNV5mj4Fq8qAHjCcTpsnkiYSl/E/YvZ4LH4ZDSmcldvIHNO9CFod7TrLMf8I0x9LJeUkRKZ94NEmPlM6eu7OlG5wu3WEkwtu7e7S+pFKu8SOQUR+HjMdjRqPRysSCdMAvHWK0tCYIApTvUy2XRa6JoogwDFem0wm57veofA8w6qlMKY6Pj/A9j1qtRqPRmB2yKnX5hy9+nmN7CuPUdfGLRUzL4iSfxxWpZdnYjoMn2bYdLNueZ6lZ8p0n0ziSTdOc1QuFAsWiz+GXr/wG2eDbn2f5XfgAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image.png&quot;
        title=&quot;image.png&quot;
        src=&quot;/static/00853f394c43f79edf36be7efe935c9a/fcda8/188bf389-b38c-4029-b27b-b4de0e2cfa66_image.png&quot;
        srcset=&quot;/static/00853f394c43f79edf36be7efe935c9a/12f09/188bf389-b38c-4029-b27b-b4de0e2cfa66_image.png 148w,
/static/00853f394c43f79edf36be7efe935c9a/e4a3f/188bf389-b38c-4029-b27b-b4de0e2cfa66_image.png 295w,
/static/00853f394c43f79edf36be7efe935c9a/fcda8/188bf389-b38c-4029-b27b-b4de0e2cfa66_image.png 590w,
/static/00853f394c43f79edf36be7efe935c9a/efc66/188bf389-b38c-4029-b27b-b4de0e2cfa66_image.png 885w,
/static/00853f394c43f79edf36be7efe935c9a/c83ae/188bf389-b38c-4029-b27b-b4de0e2cfa66_image.png 1180w,
/static/00853f394c43f79edf36be7efe935c9a/70ad2/188bf389-b38c-4029-b27b-b4de0e2cfa66_image.png 1665w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Empreinte Carbone de produits alimentaires &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/9785cfba8fa9fce11593d2de73af0e45/573d3/d782c039-9107-4724-a54d-424e4b48628c_image.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 54.05405405405405%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB1UlEQVQoz42Ra28SQRSG92f7B0yqpsQPItgmVpFL7QUbBIpc5LrQYosUAotGw0WBGtEWs8udfRy2lBBSjJM8mffMzHnPmRlpONUZjsZUazW8Pi/+42N8fr/BTC/j8ft44327wJvM8S6rEBBU6m16/R7SVfcPnU6HSqmI3fwQp9WEw7qJ65kJp+URDvMDnAK7eQOvxUQxsE+9EONSkbn+3REmIwaiofFkCrqOVK03aDTqlIWha8fKa9s2ey+2sG9bcDnsHBy6OTxws+/xUKjWGA4mrBu6QOoNBnS715Quijif7LD71Ibt+SsKgSO06hfoDaA/hOH4Jkmfok/niI5WkVqXP2i3W8Kwwtb9PV5uuvlYadCbV50usZzISrwwnN19JKp9zefIbdzjczyI2tNgMrnp5o6kfxpq/QGq+Jh0/pzHR7viobvCa3JnwvLaOi397Pyi8f0buUQa2R/gqttFUzVUVUXTNAN1Pv8PklL5RP4iz6mcpXBWpCXes9lsGrRaLYPleJ02YoFUKiucnpwQeh8he/4BRVEol8uL+VYvr6/u3eoZUjIlk06niUVjJJNJMpkM8XiccDhsaFmWCYVCJBIJI45Go0QiEUPPzgeDQVKplOEx4y/srBXUuDNvIwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image.png&quot;
        title=&quot;image.png&quot;
        src=&quot;/static/9785cfba8fa9fce11593d2de73af0e45/fcda8/d782c039-9107-4724-a54d-424e4b48628c_image.png&quot;
        srcset=&quot;/static/9785cfba8fa9fce11593d2de73af0e45/12f09/d782c039-9107-4724-a54d-424e4b48628c_image.png 148w,
/static/9785cfba8fa9fce11593d2de73af0e45/e4a3f/d782c039-9107-4724-a54d-424e4b48628c_image.png 295w,
/static/9785cfba8fa9fce11593d2de73af0e45/fcda8/d782c039-9107-4724-a54d-424e4b48628c_image.png 590w,
/static/9785cfba8fa9fce11593d2de73af0e45/efc66/d782c039-9107-4724-a54d-424e4b48628c_image.png 885w,
/static/9785cfba8fa9fce11593d2de73af0e45/c83ae/d782c039-9107-4724-a54d-424e4b48628c_image.png 1180w,
/static/9785cfba8fa9fce11593d2de73af0e45/573d3/d782c039-9107-4724-a54d-424e4b48628c_image.png 1650w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Empreinte eau de produits alimentaires &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Par exemple, lorsqu’on consomme une noix, on a un bilan en CO2 extrêmement faible (c’est une culture qui stocke du carbone), mais on a une empreinte eau très forte.&lt;/p&gt;
&lt;p&gt;On a besoin d’une grandeur qui nous permettrait d’éviter les &lt;strong&gt;transferts d’impact&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Comment éviter les transferts d’impact ?&lt;/h2&gt;
&lt;p&gt;La commission Européenne a demandé à des scientifiques de se mettre d’accord sur la question, sous le projet &lt;em&gt;Product Environnemental Footprint, _PEF pour les intimes&lt;/em&gt;. On a commencé par déterminer quels sont les indicateurs à mesurer. La Commission Européenne a tranché pour &lt;a href=&quot;https://doc.agribalyse.fr/documentation/methodologie-acv#les-indicateurs-acv-fournis-dans-agribalyse&quot;&gt;16 indicateurs.&lt;/a&gt; Sans tous les lister, on y retrouve le changement climatique, l’épuisement des ressources en eau, l’épuisement des ressources énergétiques, l’usage des terres, l’eutrophisation terrestre/eau douce/marine …&lt;/p&gt;
&lt;p&gt;Le PEF propose ensuite de regrouper ces grandeurs sous un “Single Score”, exprimé en points. Il est obtenu à la suite d’une normalisation et d’une pondération.&lt;/p&gt;
&lt;p&gt;Normaliser ça signifie mettre toutes les grandeurs sous une même unité (on ne compare pas du CO2 et des M3 d’eau !).&lt;/p&gt;
&lt;p&gt;Pondérer c’est donner plus ou moins d’importance aux différents impacts. Pour le PEF, la pondération prend à la fois en compte la robustesse relative de chacun de ces indicateurs et les enjeux environnementaux.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 290px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/ff8b81351c9e0648c252e0b7da61f931/139a5/06fff7b3-c48b-442c-933f-20c7c3f1b1ed_image.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 106.75675675675676%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAVCAYAAABG1c6oAAAACXBIWXMAAAsTAAALEwEAmpwYAAADIklEQVQ4y52U22/bVBzH+18i8VAexsRlEoinCdAkxBMSmzYoEnc0CSGK1t2glI5uDJWVJO3WpHFI1jRrqOOkrhPHiRM38fXDsVM7l3V94Eg/HdvnnI+/v/O7zHHKCIIgmrvdLs1mMzJN0xgMBlPrp425s4CyLJNOp8nn89Gsqur/A5516CzYc8Bwc2ziDd8Pzcf3vMgC8Ty5Z7z3FGC8EBBvfLGKGDwpYgr4okW9H1DvWrTTGcyVexznJbx+fxo849ncJCyWNfRgXcqw8HuNbzfr7H78EfJL8yivX0C99AHm2oPxj2ddnr2LTL/J/bbGejHP56spVssWjTu3BOhDlLfeQX7lVQ5enke7cg233Y4UMiEqctk/+dDo17mslvhU2+OZ2cU6trAdl0a9TuvwEPXJNsqvK8J+4+DmbVSpQNs0UcXaobAwX0cKQ7pj4Fe/Q5Lv8liojMexgD7d3SW3s4NUKlGqVtmv1ZCyWbIbGzwV3/cqFQqSRLlcDoF+dNDXU3j7l0FdTu5m9Kvp6HKSRvpX36CcfzNyPXCcaZcDkW/Ow21hy3hmgziBPHEwdKUmFPVFdCNv/JGA41ye2vk3UC68jV39N/nhCGjZ2D/tMFz8Rzy7iS7LssiJVNnO7VCuPMM0e4la1zBoXHyf2rnXsDa3RkAhYATsDbDvZLBX0pH8GNjrGhhHCqZ+hKHKdNutBOiJxqG+ewll/hz9R3/PAF0b568b2H/+gN/vjG/O0nGln/Fq27iFX8CQkzWna1K8cpXixfewiqWxy3H+udkHOCtfQ7UwUV4TVRBXhFARDkPcW+aLL5FuLEVBSoKSRLlewfrje+T9dYaBfbJhphmcBCQElG7dJnPtE+pbW1P1neRhmA6VVp6N1iOKRl6U3+DUxuBYAyqr98gsfIb04yLuTNOdCyZeBv4QSX9CSlsnq2+JyjkgGLbwnQ6+mBnscfR4mdTVBXLXr9M7VMf5meThZHOIGsOQcqdIqrlBSV3DVZaw63exlZvYtUWG8hLV+8v0VO052FRzmO3Gut2m0yngaQ9xjtZwxOzqm/iWHCX9LCw++x8TmTLA3MTW5gAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image.png&quot;
        title=&quot;image.png&quot;
        src=&quot;/static/ff8b81351c9e0648c252e0b7da61f931/139a5/06fff7b3-c48b-442c-933f-20c7c3f1b1ed_image.png&quot;
        srcset=&quot;/static/ff8b81351c9e0648c252e0b7da61f931/12f09/06fff7b3-c48b-442c-933f-20c7c3f1b1ed_image.png 148w,
/static/ff8b81351c9e0648c252e0b7da61f931/139a5/06fff7b3-c48b-442c-933f-20c7c3f1b1ed_image.png 290w&quot;
        sizes=&quot;(max-width: 290px) 100vw, 290px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Single Score pour 1kg de Burritos.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 304px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/7539f9814cc30718eb336a13c9142ea0/c1724/c3a98701-89c3-4e16-90ab-4e285c634b6f_image.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 189.86486486486487%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAmCAYAAADEO7urAAAACXBIWXMAAAsTAAALEwEAmpwYAAAEsklEQVRIx4WWCW/iWBCE/f//1mql1Yx2djZMgFxAOGxOm8MYsDG1/T3ShIlI1lLr3eWu6u5nR9t9rV0pVSeprK/aq35xOIl9tMX+3D9UUr47qj+aap7l2pfsqxXtbWE6X+v7j4buWy/68W8ztP/ctfTt7zv9bLSVrnZi3yovtSmOBnhStt7rpRfrjz+/KZlmWubMHRUVh/PGeJJqMl8pmWQaz1YaT5e2cRn6m6IS+/I3sHxXq/nQ1V/ff6r12NNiWWizk9bFSVG+O4XNh+PZoOh9aOHZdq8AxD7anU2WpkltkmCH8qj9oTSrFG23R8XjVPftjppmjeazfhllPBgmC42S1Naz4O0wXmi2yFUdjzqdam02azWbTeV5HsZVVSradEZK+mM1n14D4N2vR3VtDI3Y6CeTM3X6/eFM8zTXxgCm06lms5men58Vx4kWi4XW67V5aDSS2VqPL0M9Gfjd/bNFbq7CopZMVxqZ9/FkGWxgHs6zQuvNRuNxovl8bmCxkiQJbZqmig4mWnU8a2HyyZqQMsy7Rsf6fZ29ZVnqaLSrygS2p67r0MciI28TZ02ONkEL7MnmV6tV0KkotqbTxsZL7YoigGG73U6dTsf2bAIoL4qyhwfF3a5a1jbuGnqw9v7+XpPJJGxcLpfW5sqyLOhGAADiZcy9vLyEvexjLcKTU/CyvrTeR2R0YTOG8IV5yIsAYYx+BAcNGV8AP9pXD9TQC9rXGgbKTNwCwn0onXXcBJrb7TZ46BrS7/f7YS/jM+B+qPlkoHbb8q/bUavVspQYa7/fBwoYoNCnz2GAGGNoCGV/WXSqyxDl8i3sh8Phkg6uIZ7SchBPCc7r62vQsWsBxUajUViPYPmRsgfns6cqq4tmbr9p+NmDt+gHFQxaSMFBWtZdO/pYZEkStOn1ekHgp6enkIuP1rp+gEIbSmiINzAAlFpGGlgFD9Nyrmk6Vf+1r95rL+STe3MddcYeFA6iHzmIlgTRAxMob/NtEBUwCv4Wdea9egAEzJOateFweK6UW+J/DBI6QY8IexA8Fz3BL7XM5YAH19nvdg3sLw5aHd6D4tH1caA8M5dJUPKJgBAcxu12+zfK5CKUHQSPmUdzz+FIs77Ws7GeO90QabTAnIbTRh8OOyCHiS4OEBRPHSu9XKt0YV4NgmdEDUAO+gMwhwEEmDHpBAuCSeqQATgRKKeWY1yU1DG0ycXBYHDRzesaQFLDPfRAeQxCUL4qsa8qyEE8oS+VwgboeYFDGzruGVQZ45m31dVFAhO8hO4ZsJdqlczUG/QDbUBdPw4RQW5rSo/E5gUcBhgJOOMl+ZaH0tI2j6xKALsOxOV2MWBSxjVkzb8nRJggAhqCUv/PdX/rk+D6XVfKex7aAyXocHF6zdJi/t1w6ujqh71SvH8BXCyycP2T2OQUAaLPZeHeAXhdKZ42aOo1fgY8xMrmsekQh4j5vchN4g9eohkGgNOk32g0gn6ntzvBAIdaptxrA/PuKUQNQALEnxWH/METxngDCEyoLJjQZz1QzrKlHh8fwqLTYhGPXHz/rLqH118+z9GLhvy3EHqCcusjz0bPRb9Z/Lq77oc8/Ahw67fks9K7Zf8BBTBqxcPoDoQAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image.png&quot;
        title=&quot;image.png&quot;
        src=&quot;/static/7539f9814cc30718eb336a13c9142ea0/c1724/c3a98701-89c3-4e16-90ab-4e285c634b6f_image.png&quot;
        srcset=&quot;/static/7539f9814cc30718eb336a13c9142ea0/12f09/c3a98701-89c3-4e16-90ab-4e285c634b6f_image.png 148w,
/static/7539f9814cc30718eb336a13c9142ea0/e4a3f/c3a98701-89c3-4e16-90ab-4e285c634b6f_image.png 295w,
/static/7539f9814cc30718eb336a13c9142ea0/c1724/c3a98701-89c3-4e16-90ab-4e285c634b6f_image.png 304w&quot;
        sizes=&quot;(max-width: 304px) 100vw, 304px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Aperçu du détail des données&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Le PEF a des limites malheureusement. Il manque un indicateur spécifique à la biodiversité, il manque aussi un indicateur pour les pollutions au micro-plastique … Mais c’est au moins une méthodologie qui fait &lt;strong&gt;consensus chez les scientifiques&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Donc comment on évite les transferts d’impact ? On se dote d’un score le plus global possible, et on ajuste notre régulateur de vitesse de telle sorte à ce qu’il diminue le score.&lt;/p&gt;
&lt;h2&gt;Comment se servir du Single Score ?&lt;/h2&gt;
&lt;p&gt;Pour obtenir ce score, on mène une &lt;strong&gt;Analyse du Cycle de Vie (ACV).&lt;/strong&gt; Ce terme désigne une méthode d’évaluation qui permet d’analyser tous les maillons de la chaîne de valeur d’un produit ou service.&lt;/p&gt;
&lt;p&gt;Et on parle vraiment de tous les maillons ! Ça part de l’extraction de la matière première, jusqu’à la fin de vie du produit avec le traitement des déchets. Quand on fait l’ACV d’une tomate, on part depuis les minéraux qui constituent le tracteur jusqu’au compost du particulier. On compte aussi le cas ou la tomate est jetée à la poubelle, on compte aussi le cas où la tomate a été mise de côté car “hors calibre” à la ferme.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/5cb963b0315137238e31139f6844ecaa/712f7/b7d35e8b-6c1a-4273-a6b7-a0520bf4849b_image.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 87.83783783783784%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAACXBIWXMAAAsTAAALEwEAmpwYAAACn0lEQVQ4y4VUy6rUQBDN/2/9AtGF6EJBLteFgg9EceHKjYJ655l0kn4k3XlNJhxPdc/IhTswgaK60qmTqnOqO2vbFiEEeB/QuCZa23gE39GnOHBPvnmwz1znHOOWa2K0HpnWFmVlMU0zbeIHTCLQ4XDAMAwxSeJxHKNJUllWLMCnmF72j8djzMmcCyiqEdoO6Lv0FwGeppFxx7hl4hDfDX0f455ewDrZJ+AwjASbYwHZ1Gvcvlf4+FVhCBpKaex2dfRlqZHnjPc18iJZUWjsc/HJ5BvxSqV1tkwWz14rPL9RfGHw64/GaqOx2Wpsd4bJhgk0ZeK+WEWKtHbQtUVdGxjSZo2lN8jGocVqG/B7PaAj8ULw0HeJP3IjLXZB2kztOcvEmtWrMgJYk0zWEbCsOzg/Q55pOsAYB1UnUYSjhoqudxXFSSJY6yLY3793/0HuW6ZNi7ttj73qOQqsoOF4hGNUTapsGMsPZ8YijDm1prW+DDiPGk9f5XhDYUSgqtLkpkJd1eRH1pJYn7y5atlycHjyssLNO1GZahUClpL1CVAIP1vizZJLdxkw+Aa54vT7EdOYhKjrMs6aDKyIJG1KLCYcSvW77e4yYKkH1O6AeV7ImZyUQFECBgognLVtD+3I4XykzbE6EWV1t7oM2DYOP356zl8aD+d8rPZ8zNy9syzH8GrLy6Tx6PEOL272mLoKRV6yAhWrqHhmxasixdLqVVGOU4vbDxafvmkMnYyDOQ20jzdJum18rFLW5wrP64ctM1GunmWR2yLdNprDLYMtIkisWN35ipNWpfL1an0ZMC8D9uUEHw5MoooURVMkARxlsNsOteXtw3hZllidAG7Wm8uAXbB4+1njy3eNzts4InJeI+kye/RyhuM5du6qKP8ALO9Uw6tTRBgAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image.png&quot;
        title=&quot;image.png&quot;
        src=&quot;/static/5cb963b0315137238e31139f6844ecaa/fcda8/b7d35e8b-6c1a-4273-a6b7-a0520bf4849b_image.png&quot;
        srcset=&quot;/static/5cb963b0315137238e31139f6844ecaa/12f09/b7d35e8b-6c1a-4273-a6b7-a0520bf4849b_image.png 148w,
/static/5cb963b0315137238e31139f6844ecaa/e4a3f/b7d35e8b-6c1a-4273-a6b7-a0520bf4849b_image.png 295w,
/static/5cb963b0315137238e31139f6844ecaa/fcda8/b7d35e8b-6c1a-4273-a6b7-a0520bf4849b_image.png 590w,
/static/5cb963b0315137238e31139f6844ecaa/efc66/b7d35e8b-6c1a-4273-a6b7-a0520bf4849b_image.png 885w,
/static/5cb963b0315137238e31139f6844ecaa/c83ae/b7d35e8b-6c1a-4273-a6b7-a0520bf4849b_image.png 1180w,
/static/5cb963b0315137238e31139f6844ecaa/712f7/b7d35e8b-6c1a-4273-a6b7-a0520bf4849b_image.png 1181w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Extrait de l’ACV du Burritos, de l’usine jusqu’au supermarché&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Une fois qu’on a modélisé un produit existant, on peut commencer à imaginer des scénarios &lt;strong&gt;d’éco-conception.&lt;/strong&gt; Si on reprend le schéma du régulateur de vitesse, on va donc envoyer un signal de rétro-action.&lt;/p&gt;
&lt;p&gt;On peut faire une première tentative en essayant de chercher à s’approvisionner de façon locale : on supprime tous les transports (oui c’est utopique, mais faisons l’exercice).&lt;/p&gt;
&lt;p&gt;Voici le résultat :&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b13215eed00df452aff02b8ebeee67f0/e2310/5c04f37c-91c1-4317-8446-da80e68d4837_image.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 10.135135135135135%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAdElEQVQI1x3MQRaDIAwAUe9/y1apERA1CYKrKc/dLOb9qd6NLRaOo2BmqCruTs6ZEAJaIq06tVfiIeyWSVfkaidl9Jp/7B5RE9rjTPV++M6RTdYB+ou62wuKCJoCvdoLztuHdQ+EtAw4of0knkLS8V0z/TH+FkyXyJXik9cAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image.png&quot;
        title=&quot;image.png&quot;
        src=&quot;/static/b13215eed00df452aff02b8ebeee67f0/fcda8/5c04f37c-91c1-4317-8446-da80e68d4837_image.png&quot;
        srcset=&quot;/static/b13215eed00df452aff02b8ebeee67f0/12f09/5c04f37c-91c1-4317-8446-da80e68d4837_image.png 148w,
/static/b13215eed00df452aff02b8ebeee67f0/e4a3f/5c04f37c-91c1-4317-8446-da80e68d4837_image.png 295w,
/static/b13215eed00df452aff02b8ebeee67f0/fcda8/5c04f37c-91c1-4317-8446-da80e68d4837_image.png 590w,
/static/b13215eed00df452aff02b8ebeee67f0/efc66/5c04f37c-91c1-4317-8446-da80e68d4837_image.png 885w,
/static/b13215eed00df452aff02b8ebeee67f0/e2310/5c04f37c-91c1-4317-8446-da80e68d4837_image.png 968w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Comparaison d’impact Burritos vs Burritos sans aucun transport&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On se rend compte que même dans un scénario de réduction maximale des transports, on ne réduit pas de façon significative les impacts.&lt;/p&gt;
&lt;p&gt;On identifie clairement que le boeuf haché est un “point chaud” de notre ACV. On a même ce qui ressemble au &lt;a href=&quot;https://fr.wikipedia.org/wiki/Principe_de_Pareto&quot;&gt;principe de Pareto&lt;/a&gt; : 20% de la matière qui compose mon burritos cause 80% des impacts environnementaux !&lt;/p&gt;
&lt;p&gt;Essayons de modéliser un burritos au poulet :&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/02cc2dd7d59991edb1d329d5150d7c7f/aa08e/99a456f5-5d6d-41ee-8cdf-4a2cdaa81d39_image.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 10.135135135135135%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAdUlEQVQI1zWMSQ6DMBDA+P8rEQWyQspMMoFe3BaJgyVf7KFZJ8RCKTuqioigtZJzZl1XpCR6a9hpxHdg141NM9KP2/3myDWSLFOvytDsYpwi3rt7+JBSwv2HcaZXoZ2NyY8s6cUcJ4rtHGchFEcQx2K//qN8ARmcl7M2KW8bAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image.png&quot;
        title=&quot;image.png&quot;
        src=&quot;/static/02cc2dd7d59991edb1d329d5150d7c7f/fcda8/99a456f5-5d6d-41ee-8cdf-4a2cdaa81d39_image.png&quot;
        srcset=&quot;/static/02cc2dd7d59991edb1d329d5150d7c7f/12f09/99a456f5-5d6d-41ee-8cdf-4a2cdaa81d39_image.png 148w,
/static/02cc2dd7d59991edb1d329d5150d7c7f/e4a3f/99a456f5-5d6d-41ee-8cdf-4a2cdaa81d39_image.png 295w,
/static/02cc2dd7d59991edb1d329d5150d7c7f/fcda8/99a456f5-5d6d-41ee-8cdf-4a2cdaa81d39_image.png 590w,
/static/02cc2dd7d59991edb1d329d5150d7c7f/efc66/99a456f5-5d6d-41ee-8cdf-4a2cdaa81d39_image.png 885w,
/static/02cc2dd7d59991edb1d329d5150d7c7f/aa08e/99a456f5-5d6d-41ee-8cdf-4a2cdaa81d39_image.png 967w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Comparaison d’impact Burritos boeuf vs poulet&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Là on a une réduction d’impact bien plus satisfaisante !&lt;/p&gt;
&lt;h2&gt;Pourquoi cette méthodologie n’est-elle pas plus connue que ça ?&lt;/h2&gt;
&lt;p&gt;La bonne nouvelle, c’est que l’ACV va bientôt être très largement adoptée. Le gouvernement français travaille sur une loi d’&lt;a href=&quot;https://www.ecologie.gouv.fr/laffichage-environnemental-des-produits-et-des-services-hors-alimentaire&quot;&gt;Affichage Environnemental &lt;/a&gt;obligatoire, qui consistera à apposer une note sur les produits et les services vendus.&lt;/p&gt;
&lt;p&gt;Ce score sera défini par l’état, et sera basé principalement sur des ACV.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/5fe4a92994dc1a4e30a99a0e0f5ccfaf/5ebd7/b88338fb-c753-42e2-a5be-320c1864281f_image.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 27.7027027027027%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAIAAABM9SnKAAAACXBIWXMAAAsTAAALEwEAmpwYAAABNUlEQVQY02P4+O171Y4rwcvOXnjy6v/////+kwAYZp+8JdJzKmbDzYVn7tx++e73n1/vvn5/++XHuy8/QOTXn19+/P74/den70DGr59//v4CIwiDoWj7ZaO5V3ffe7/n6v3KdUfnHbncsvVk3LzdKQv3pi/eByQdutcFT98CRC696+VKF8mULAQiubJFIvlzGZLm7Srb/zB78xXVwjku3etrNhzr2XVq8v5z0w6cm33k4rT958zbVhs1L7XpXGXSulyxYgEEqdUsZoifwODWt7F009m8lUfsO9elLdrfvetc4crDZWuOFq8+Ur72aPmao4nz90Jckbl0X8HKQ/krDhauOghkJC3YzQAKpL9//vz9C2T8/ffv5++/f//+A3L//P33G8T49w8chv9AAKTgL4j8DxEGAINIEVIvrg/3AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image.png&quot;
        title=&quot;image.png&quot;
        src=&quot;/static/5fe4a92994dc1a4e30a99a0e0f5ccfaf/fcda8/b88338fb-c753-42e2-a5be-320c1864281f_image.png&quot;
        srcset=&quot;/static/5fe4a92994dc1a4e30a99a0e0f5ccfaf/12f09/b88338fb-c753-42e2-a5be-320c1864281f_image.png 148w,
/static/5fe4a92994dc1a4e30a99a0e0f5ccfaf/e4a3f/b88338fb-c753-42e2-a5be-320c1864281f_image.png 295w,
/static/5fe4a92994dc1a4e30a99a0e0f5ccfaf/fcda8/b88338fb-c753-42e2-a5be-320c1864281f_image.png 590w,
/static/5fe4a92994dc1a4e30a99a0e0f5ccfaf/5ebd7/b88338fb-c753-42e2-a5be-320c1864281f_image.png 704w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Proposition d’illustration pour l’affichage environnemental&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On a là les outils pour aider les consommateurs à mieux choisir, et donc inciter les professionnels à mieux concevoir leurs produits et services.&lt;/p&gt;
&lt;h2&gt;Sources&lt;/h2&gt;
&lt;p&gt;Données d’impact environnemental de différents biens alimentaires (schémas en histogramme): &lt;a href=&quot;https://ourworldindata.org/environmental-impacts-of-food&quot;&gt;https://ourworldindata.org/environmental-impacts-of-food&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;L’outil d’ACV simplifiée que je développe: &lt;a href=&quot;https://karbon.earth&quot;&gt;https://karbon.earth&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;L’affichage environnemental réglementaire: &lt;a href=&quot;https://www.ecologie.gouv.fr/laffichage-environnemental-des-produits-et-des-services-hors-alimentaire&quot;&gt;https://www.ecologie.gouv.fr/laffichage-environnemental-des-produits-et-des-services-hors-alimentaire&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;La base de données utilisée pour les produits agro-alimentaires: &lt;a href=&quot;https://doc.agribalyse.fr/documentation/conditions-dusage-des-donnees#guide-utilisateur&quot;&gt;https://doc.agribalyse.fr/documentation/conditions-dusage-des-donnees#guide-utilisateur&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Exploit Airtable inside your React app]]></title><description><![CDATA[Intro At Karbon 🌱, we iterate fast and we are always looking for ways to improve our products and services.  We had the idea of building an…]]></description><link>http://nans-dumortier.com/Exploit Airtable inside your React app/</link><guid isPermaLink="false">http://nans-dumortier.com/Exploit Airtable inside your React app/</guid><pubDate>Wed, 11 May 2022 18:35:00 GMT</pubDate><content:encoded>&lt;h2&gt;Intro&lt;/h2&gt;
&lt;p&gt;At &lt;a href=&quot;https://www.karbon.earth/&quot;&gt;Karbon 🌱&lt;/a&gt;, we iterate fast and we are always looking for ways to improve our products and services. &lt;/p&gt;
&lt;p&gt;We had the idea of building an idea box, allowing users to create, share and vote for ideas of new features.&lt;/p&gt;
&lt;p&gt;This is the typical project where we have to store unsensitive data entered by users. However we wanted to avoid impacting the rest of our application (e.g we don’t want to change our database schema).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://airtable.com/&quot;&gt;Airtable&lt;/a&gt; is a great tool for this kind of usecase.&lt;/p&gt;
&lt;h2&gt;Let’s build this idea box ! 🗳️&lt;/h2&gt;
&lt;p&gt;Airtable provides an &lt;a href=&quot;https://www.npmjs.com/package/airtable&quot;&gt;npm package&lt;/a&gt; to interact with their API.
However, since I was working with multiple tables (one for votes, another one for ideas), I found myself repeating a lot of boilerplate code.
I landed on a &lt;a href=&quot;https://www.npmjs.com/package/use-airtable&quot;&gt;hook&lt;/a&gt; that seemed to provide a nice abstraction to interact with Airtable, but it had some bugs and the author didn’t seem to willing to spend time on it. So I decided to write my own hook.&lt;/p&gt;
&lt;p&gt;On top of fixing a few issues, I worked on the following points : &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;provide an option to handle errors when fetching, updating or deleting data&lt;/li&gt;
&lt;li&gt;provide an option to filter records using Airtable’s &lt;code class=&quot;language-text&quot;&gt;QueryParams&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Usage 👩‍💻👨‍💻&lt;/h2&gt;
&lt;p&gt;Install the hook and Airtable’s package with your favorite package manager, for example npm :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; --save airtable use-airtable-crud&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;typescript&quot;&gt;&lt;pre class=&quot;language-typescript&quot;&gt;&lt;code class=&quot;language-typescript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; records&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; createRecord&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; updateRecord&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; deleteRecord&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; getRecords&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; loading &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useAirtable&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&apos;TABLE_NAME&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token constant&quot;&gt;AIRTABLE_API_KEY&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token string&quot;&gt;&apos;TABLE_BASE_ID&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      filterByFormula&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;{myField} = TRUE()&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can find the source code of the hook &lt;a href=&quot;https://github.com/NansD/use-airtable-crud&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Outro&lt;/h2&gt;
&lt;p&gt;I hope this hook can be useful for you too! Prototyping and iterating is a great way to learn new things.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Atelier tech hunter]]></title><description><![CDATA[Expérience candidat Résultat de toutes les relations entre l’entreprise et le candidat. CF UX, expérience client, etc Les interviewers…]]></description><link>http://nans-dumortier.com/Tech Hunter/</link><guid isPermaLink="false">http://nans-dumortier.com/Tech Hunter/</guid><pubDate>Wed, 07 Oct 2020 09:35:00 GMT</pubDate><content:encoded>&lt;h1&gt;Expérience candidat&lt;/h1&gt;
&lt;p&gt;Résultat de toutes les relations entre l’entreprise et le candidat. CF UX, expérience client, etc&lt;/p&gt;
&lt;p&gt;Les interviewers techniques sont un acteur clé de l’expérience du candidat vis à vis de l’entreprise.&lt;/p&gt;
&lt;p&gt;Pour être les meilleurs dans l’expérience candidat : atelier pour être en constante amélioration.&lt;/p&gt;
&lt;p&gt;Tenue vestimentaire : correcte. C’est pas très important.&lt;/p&gt;
&lt;p&gt;Prendre connaissance du CV, préparer des questions par rapport au parcours.&lt;/p&gt;
&lt;p&gt;Prendre rdv par mail/téléphone, proposer plusieurs créneaux, réserver une salle (si c’est en présentiel).&lt;/p&gt;
&lt;p&gt;En visio: mettre la caméra. Utiliser Webex (pour être en conformité avec IBM).&lt;/p&gt;
&lt;p&gt;Prendre connaissance du CV À L’AVANCE et le relire avant l’entretien.&lt;/p&gt;
&lt;p&gt;En entretien on représente l’entreprise mais aussi notre équipe.&lt;/p&gt;
&lt;p&gt;“Do’s and Don’ts” de l’entretien&lt;/p&gt;
&lt;p&gt;Se présenter, s’assurer que tout va bien, papier, crayon, café, eau.&lt;/p&gt;
&lt;p&gt;Présenter le poste, prendre le temps avec lui. Ne pas couper la parole.&lt;/p&gt;
&lt;p&gt;Marquer positivement le candidat ! (parce qu’on se souvient toujours des très mauvais ou des très bons candidats)&lt;/p&gt;</content:encoded></item><item><title><![CDATA[CSS Interview questions]]></title><description><![CDATA[Those are just some random questions I sometimes ask when evaluating junior developers. ⭐ What will these lines do ? Name 2 CSS styling…]]></description><link>http://nans-dumortier.com/Interview/css/</link><guid isPermaLink="false">http://nans-dumortier.com/Interview/css/</guid><pubDate>Sat, 15 Aug 2020 18:35:00 GMT</pubDate><content:encoded>&lt;p&gt;Those are just some random questions I sometimes ask when evaluating junior developers.&lt;/p&gt;
&lt;p&gt;⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;What will these lines do ?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;css&quot;&gt;&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.header&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; red&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;#header&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; yellow&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;.header &gt; h1&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; blue&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;input.header&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; brick&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token selector&quot;&gt;div.header&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; brown&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;html&quot;&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;header&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt; Hello, world! &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Name 2 CSS styling frameworks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How would you build a responsive interface ?&lt;/li&gt;
&lt;li&gt;What is the difference margin vs padding ?&lt;/li&gt;
&lt;li&gt;What are CSS preprocessors ?&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[HTML Interview questions]]></title><description><![CDATA[Those are just some random questions I sometimes ask when evaluating junior developers. ⭐ Is there anything wrong here ? ⭐⭐ What is the…]]></description><link>http://nans-dumortier.com/Interview/html/</link><guid isPermaLink="false">http://nans-dumortier.com/Interview/html/</guid><pubDate>Sat, 15 Aug 2020 18:35:00 GMT</pubDate><content:encoded>&lt;p&gt;Those are just some random questions I sometimes ask when evaluating junior developers.&lt;/p&gt;
&lt;p&gt;⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Is there anything wrong here ?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;html&quot;&gt;&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;input&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;h1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
	Hello, world
	&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;h1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;input&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is the basic structure of an html document ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;what is a web component ?&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[JavaScript Interview questions]]></title><description><![CDATA[Those are just some random questions I sometimes ask when evaluating junior developers. ⭐ What is the difference between  and  ? What is the…]]></description><link>http://nans-dumortier.com/Interview/javascript/</link><guid isPermaLink="false">http://nans-dumortier.com/Interview/javascript/</guid><pubDate>Sat, 15 Aug 2020 18:35:00 GMT</pubDate><content:encoded>&lt;p&gt;Those are just some random questions I sometimes ask when evaluating junior developers.&lt;/p&gt;
&lt;p&gt;⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is the difference between &lt;code class=&quot;language-text&quot;&gt;==&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;===&lt;/code&gt; ?&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;What is the output ?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; animals &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;zebra&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;horse&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	animals&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;k&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;undefined&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;animals&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;?&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; ⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;What is the difference ?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token comment&quot;&gt;/*() =&gt; { ... }*/&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token comment&quot;&gt;/*() =&gt; { ... }*/&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;What is the output ?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; numbersAndStuff &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;undefined&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; filtered &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; numbersAndStuff&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;filter&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;element&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; element&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;filtered&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;What is a closure ?&lt;/li&gt;
&lt;li&gt;What is a Promise ?&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;What is the output ?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;updateUserName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;user&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; name&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
user&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;name &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; name&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; user&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; john &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
name&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;John&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
age&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;48&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;John&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; john&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; jane &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;updateUserName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;john&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;Jane&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;Jane&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; jane&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;John&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; john&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is the event loop ?&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Nodejs Backend Development questions]]></title><description><![CDATA[Those are just some random questions I sometimes ask when evaluating junior developers. ⭐ What is Express ? What is a middleware ? What are…]]></description><link>http://nans-dumortier.com/Interview/nodejs/</link><guid isPermaLink="false">http://nans-dumortier.com/Interview/nodejs/</guid><pubDate>Sat, 15 Aug 2020 18:35:00 GMT</pubDate><content:encoded>&lt;p&gt;Those are just some random questions I sometimes ask when evaluating junior developers.&lt;/p&gt;
&lt;p&gt;⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is Express ? What is a middleware ?&lt;/li&gt;
&lt;li&gt;What are the Request, Response, and Next parameters in Express Middlewares ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is an ORM or ODM ?&lt;/li&gt;
&lt;li&gt;How can an API recognize a User ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How do you handle authentication ?&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[React Interview questions]]></title><description><![CDATA[⭐ What is the difference between state and props? How do you update a component’s state ? What is the lifecycle of a component ? ⭐⭐ What are…]]></description><link>http://nans-dumortier.com/Interview/react/</link><guid isPermaLink="false">http://nans-dumortier.com/Interview/react/</guid><pubDate>Sat, 15 Aug 2020 18:35:00 GMT</pubDate><content:encoded>&lt;p&gt;⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What is the difference between state and props?&lt;/li&gt;
&lt;li&gt;How do you update a component’s state ?&lt;/li&gt;
&lt;li&gt;What is the lifecycle of a component ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What are React hooks ?&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How would you refactor this code ?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;Form&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;firstName&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setFirstName&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;Taylor&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;lastName&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setLastName&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;Swift&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;fullName&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setFullName&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;setFullName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;firstName &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos; &apos;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; lastName&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;firstName&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; lastName&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token comment&quot;&gt;// ...&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How do you handle a complex state ?&lt;/p&gt;
&lt;p&gt;Let’s say I have a &lt;code class=&quot;language-text&quot;&gt;useState&lt;/code&gt; which in a parent component. This state represents complex data, and multiple children components want to update that state. What to do ?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;What is “Context” ? What do you use it for ?&lt;/li&gt;
&lt;li&gt;What is prop drilling ?&lt;/li&gt;
&lt;li&gt;How do you handle code duplication in a React codebase ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;⭐⭐⭐&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What are sources of memory leaks in React ?&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How would you refactor this code ?&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;ProductPage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; product&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; addToCart &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;product&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;isInCart&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token function&quot;&gt;showNotification&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token template-string&quot;&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;Added &lt;/span&gt;&lt;span class=&quot;token interpolation&quot;&gt;&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;${&lt;/span&gt;product&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;name&lt;span class=&quot;token interpolation-punctuation punctuation&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt; to the shopping cart!&lt;/span&gt;&lt;span class=&quot;token template-punctuation string&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;product&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;handleBuyClick&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;addToCart&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;product&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;handleCheckoutClick&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;addToCart&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;product&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;navigateTo&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;/checkout&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token comment&quot;&gt;// ...&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.scrimba.com/react-interview-questions/&quot;&gt;https://blog.scrimba.com/react-interview-questions/&lt;/a&gt;
&lt;a href=&quot;https://beta.reactjs.org/learn/you-might-not-need-an-effect&quot;&gt;https://beta.reactjs.org/learn/you-might-not-need-an-effect&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[An elegant solution for memory leaks in React]]></title><description><![CDATA[🔴 UPDATE This “solution” doesn’t seem to really avoid leaks. Even AbortController doesn’t seem to be the silver bullet against memory leaks…]]></description><link>http://nans-dumortier.com/An elegant solution for memory leaks in React/An elegant solution for memory leaks in React/</link><guid isPermaLink="false">http://nans-dumortier.com/An elegant solution for memory leaks in React/An elegant solution for memory leaks in React/</guid><pubDate>Thu, 30 Jul 2020 18:35:00 GMT</pubDate><content:encoded>&lt;h2&gt;🔴 UPDATE&lt;/h2&gt;
&lt;p&gt;This “solution” doesn’t seem to &lt;em&gt;really&lt;/em&gt; avoid leaks. Even AbortController doesn’t seem to be the silver bullet against memory leaks 😰.
Check out the &lt;a href=&quot;https://dev.to/nans/an-elegant-solution-for-memory-leaks-in-react-1hol&quot;&gt;discussion in the comments&lt;/a&gt;!&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;When working with asynchronous calls, for example API calls, you might have encountered this error :&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;Can&amp;#39;t perform a React state update on an unmounted component. This is  a no-op, but it indicates a memory leak in your application. To fix,  cancel all subscriptions and asynchronous tasks in a useEffect cleanup  function.&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;A GIF is worth a thousand words …&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;/dc3e2964d63dbf724e191cbd026adc02/leaky.gif&quot; alt=&quot;leaky GIF&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is a small page that simulates some asynchronous logic on load, and then updates the view accordingly. Here, I unmount the component before the async work has been finished, and trigger the Error. (I took this example from &lt;a href=&quot;https://stackoverflow.com/questions/56442582/react-hooks-cant-perform-a-react-state-update-on-an-unmounted-component/63176693#63176693&quot;&gt;this&lt;/a&gt; StackOverFlow post)&lt;/p&gt;
&lt;p&gt;This is caused by this code :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;Example&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setText&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;waiting...&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;simulateSlowNetworkRequest&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token function&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;done!&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// ⚠️ what if the component is no longer mounted ?&lt;/span&gt;
      &lt;span class=&quot;token comment&quot;&gt;// =&gt; Warning: Can&apos;t perform a React state update on an unmounted component.&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;h2&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;h2&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When running into that issue, I found multiple solutions, the most used one seems to be this one :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;OtherExample&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setText&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;waiting...&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;let&lt;/span&gt; isMounted &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// 👈&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;simulateSlowNetworkRequest&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt;isMounted&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// 👈&lt;/span&gt;
        &lt;span class=&quot;token function&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;done!&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// no more error&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      isMounted &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// 👈&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;h2&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;h2&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;But&lt;/strong&gt; it requires you to add quite a lot of stuff into your component, having to deal with that &lt;code class=&quot;language-text&quot;&gt;isMounted&lt;/code&gt; variable all over the place …&lt;/p&gt;
&lt;p&gt;There are other interesting solutions, like making your &lt;a href=&quot;https://dev.to/viclafouch/cancel-properly-http-requests-in-react-hooks-and-avoid-memory-leaks-pd7&quot;&gt;Promises cancellable&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt; You told me there would be an elegant solution !&lt;/h2&gt;
&lt;p&gt;I wasn’t lying! The solution I came up with is a very simple &lt;a href=&quot;https://www.npmjs.com/package/use-state-if-mounted&quot;&gt;hook&lt;/a&gt;. It works just like React’s useState, but it basically checks if the component is mounted before updating the state !&lt;/p&gt;
&lt;p&gt;Here is an example of the refactored code :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;javascript&quot;&gt;&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;OtherExample&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; setText&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;useStateIfMounted&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;waiting...&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// 👈&lt;/span&gt;

  React&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;simulateSlowNetworkRequest&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token function&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;done!&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// no more error&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;setText&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;h2&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;text&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;/&lt;/span&gt;h2&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here is the &lt;a href=&quot;https://codesandbox.io/s/use-local-variable-to-avoid-setstate-on-unmouted-component-6k08n?file=/src/index.js:459-695&quot;&gt;CodeSandBox&lt;/a&gt; if you wanna play around !&lt;/p&gt;
&lt;h2&gt;TLDR&lt;/h2&gt;
&lt;p&gt;Use &lt;a href=&quot;https://www.npmjs.com/package/use-state-if-mounted&quot;&gt;useStateIfMounted&lt;/a&gt; hook, that will only update the state if your component is mounted ! 🚀&lt;/p&gt;
&lt;p&gt;I hope this might be helpful, feel free to reach me out in any case ! 🤗&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Karbon Editor]]></title><description><![CDATA[Karbon Editor What is it about ? 🌱 A web application that enables people from the food industry
to understand the environmental impact…]]></description><link>http://nans-dumortier.com/karbon/karbon/</link><guid isPermaLink="false">http://nans-dumortier.com/karbon/karbon/</guid><pubDate>Thu, 30 Jul 2020 18:35:00 GMT</pubDate><content:encoded>&lt;h2&gt;Karbon Editor&lt;/h2&gt;
&lt;p align=&quot;center&quot;&gt;
&lt;img src=&quot;/cab1fbdd8834bf1b4d112742136b2c77/impacts.svg&quot; alt=&quot;environmental impacts&quot;&gt;
&lt;/p&gt;
&lt;h3&gt;What is it about ? 🌱&lt;/h3&gt;
&lt;p&gt;A web application that enables people from the food industry
to understand the environmental impact caused by their activity.
This is a collaborative tool that aims at making eco-designing food products easier.&lt;/p&gt;
&lt;h3&gt;My participation in this project:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fullstack development (React, Node, GraphQL, Typescript)&lt;/li&gt;
&lt;li&gt;Hiring, onboarding, training and coaching of team members&lt;/li&gt;
&lt;li&gt;Project management&lt;/li&gt;
&lt;li&gt;Management of UI/UX freelance workers&lt;/li&gt;
&lt;li&gt;CI/CD&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://karbon.earth&quot;&gt;More info&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Docker training]]></title><description><![CDATA[Docker Essentials: A developer introduction Lab 1 : Running a container  What are Containers ? A group of precesses, run in isolation. They…]]></description><link>http://nans-dumortier.com/docker-training/</link><guid isPermaLink="false">http://nans-dumortier.com/docker-training/</guid><pubDate>Fri, 13 Mar 2020 15:15:00 GMT</pubDate><content:encoded>&lt;h1&gt;Docker Essentials: A developer introduction&lt;/h1&gt;
&lt;h2&gt;Lab 1 : Running a container&lt;/h2&gt;
&lt;h3&gt; What are Containers ?&lt;/h3&gt;
&lt;p&gt;A group of precesses, run in isolation. They run on a shared kernel.
The isolation is provided by Linux &lt;strong&gt;namespaces&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;VM vs Container
VMs are heavy and slow to start because they have a full OS.
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/d2e9c16aaa7c0f777b30fd7f7280fa15/e996b/2020-03-12-16-13-05.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 54.72972972972974%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB1UlEQVQoz32Sb0/aUBTG+YB8iWXGb0HiC42JupckvnF7oVEzHWwzmmXTIqhsJgjY0jYCU2lLwZZWTfEP9M+ze6+tFjQ7ycm9vX3OL8+55yYcx4Esy2i32+j1elBVle01TUOr1YJpmgiCADToGmUU4/8SruuCQqO0LAsGgeidDoPRs3hBFI+DAYakNg6lkcBY/K3X8btwgMPcPjTilobv+yNAyzBQzOdxtJ+HTQyMOIwLPVJYqx6gcrKLP0fbEGt8CPSeNbSjM+kYYpUDT3QCXxkFxi37no+ps49415zHe3EORbE03gAC18dsYwUTFx8wKS+gQOCsNvDfAFKH4i7K1QzKlSx4oczO0+k0kskkUqkU+xYlDo3mDwjCFnj+JHT4BpCuez938G1zDV83VtFs1Nl5ndwrx3EolZ4cF3K/kP28gu9f1tEINVH9K6CiaKjyAnEqwyTPKD7BSHPZUlA5FcDXJHS7V+j3+yyfp/wylACLORUzmRqmMxKWi3p42T48jwyGXInrBVgqaJjOipjJSvh0qLNnZtv2ayBddfMGl7oBpdODce1Etp40oU4zbDQVHedqF9qV9f+WiQ0MHx/gDgdsH8Rgke7h/g63NzbJa9z3nZE3+g+C4DdLKQKZ1gAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 16 13 05&quot;
        title=&quot;2020 03 12 16 13 05&quot;
        src=&quot;/static/d2e9c16aaa7c0f777b30fd7f7280fa15/fcda8/2020-03-12-16-13-05.png&quot;
        srcset=&quot;/static/d2e9c16aaa7c0f777b30fd7f7280fa15/12f09/2020-03-12-16-13-05.png 148w,
/static/d2e9c16aaa7c0f777b30fd7f7280fa15/e4a3f/2020-03-12-16-13-05.png 295w,
/static/d2e9c16aaa7c0f777b30fd7f7280fa15/fcda8/2020-03-12-16-13-05.png 590w,
/static/d2e9c16aaa7c0f777b30fd7f7280fa15/efc66/2020-03-12-16-13-05.png 885w,
/static/d2e9c16aaa7c0f777b30fd7f7280fa15/e996b/2020-03-12-16-13-05.png 1050w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;
containers can be directly run on top of virtual machines.&lt;/p&gt;
&lt;h3&gt;What is Docker ?&lt;/h3&gt;
&lt;p&gt;Docker is tooling to manage containers.
&lt;em&gt;“build once, run anywhere”&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Why containers are appealing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;no more “Works on my machine”&lt;/li&gt;
&lt;li&gt;lightweight and fast&lt;/li&gt;
&lt;li&gt;better resource utilization&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Running a container&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker container run -t ubuntu &lt;span class=&quot;token function&quot;&gt;top&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The docker run command first starts a docker pull to download the Ubuntu image onto your host. After it is downloaded, it will start the container.&lt;/p&gt;
&lt;p&gt;Even though we are using the Ubuntu image, it is important to note that the container does not have its own kernel. It uses the kernel of the host and the Ubuntu image is used only to provide the file system and tools available on an Ubuntu system.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker container &lt;span class=&quot;token function&quot;&gt;ls&lt;/span&gt;
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

        ubuntu              &lt;span class=&quot;token string&quot;&gt;&quot;top&quot;&lt;/span&gt;               &lt;span class=&quot;token number&quot;&gt;58&lt;/span&gt; seconds ago      Up &lt;span class=&quot;token number&quot;&gt;58&lt;/span&gt; seconds                           wizardly_germain&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;then&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;$ docker container &lt;span class=&quot;token builtin class-name&quot;&gt;exec&lt;/span&gt; -it 7d1a9d47e601 &lt;span class=&quot;token function&quot;&gt;bash&lt;/span&gt;
root@7d1a9d47e601:/&lt;span class=&quot;token comment&quot;&gt;#&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt; Using docker container exec with bash is a common way to inspect a Docker container.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Namespaces are a feature of the Linux kernel. However, Docker allows you to run containers on Windows and Mac. The secret is that embedded in the Docker product is a Linux subsystem.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;2. Run multiple containers&lt;/h3&gt;
&lt;p&gt; running an nginx server :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker container run --detach --publish &lt;span class=&quot;token number&quot;&gt;8080&lt;/span&gt;:80 --name nginx nginx&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;--detach&lt;/code&gt; flag will run this container in the background.
the &lt;code class=&quot;language-text&quot;&gt;publish&lt;/code&gt; flag publishes port 80 in the container by using port 8080 on your host.&lt;/p&gt;
&lt;p&gt;So here, go to localhost:8080 :
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 558px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/871db58906fc3a2c6832ff5ca5c68885/42a8d/2020-03-12-16-53-50.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 42.567567567567565%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAABU0lEQVQoz41SzY6CYAz01T34Eh5MPHryYHyOVURA+XdBMaKrggqCzjLd/W7uT5NJhyZMp+3X8n0f+/0eWZbhcrkgz3PhzEVRCD+dTjifz7jdbmA8n8+XYLQ6nQ663S76/b6AfDweYzgcYjQaod1uo9frYTAYiPBvQdFWVVXSmU6Yr9cryrKUzO80TYUTdKymULUsy6XGf8ShpmnQdR3T6RTkxGw2w2QykZpt28JN00QUReCKFosFXNcVGIYhmY1FcLVaYb1eS2Gz2WC32yEIArCeJAk+DgcEjch2m+CvkJFVFzqgG7olHMeR2nw+h+2FmJtLWEunqduI4whGeITmHREmGaXwUEfhCBT1PE9ECDq1LKsZXYPr+dC9A97sFMv3I+q6alCjrB4o7jXuTaYg9cQhXcVxLPthDsNQ9sQ1/De+zH075IXURdUV1cV/em+v3p/inzLpoZY0cwXHAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 16 53 50&quot;
        title=&quot;2020 03 12 16 53 50&quot;
        src=&quot;/static/871db58906fc3a2c6832ff5ca5c68885/42a8d/2020-03-12-16-53-50.png&quot;
        srcset=&quot;/static/871db58906fc3a2c6832ff5ca5c68885/12f09/2020-03-12-16-53-50.png 148w,
/static/871db58906fc3a2c6832ff5ca5c68885/e4a3f/2020-03-12-16-53-50.png 295w,
/static/871db58906fc3a2c6832ff5ca5c68885/42a8d/2020-03-12-16-53-50.png 558w&quot;
        sizes=&quot;(max-width: 558px) 100vw, 558px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code class=&quot;language-text&quot;&gt;name&lt;/code&gt; flag names the container.&lt;/p&gt;
&lt;p&gt;Then, we can run another container :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker container run --detach --publish &lt;span class=&quot;token number&quot;&gt;8081&lt;/span&gt;:27017 --name mongo mongo:3.4&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We can see the containers by running &lt;code class=&quot;language-text&quot;&gt;docker container ls&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Removing containers&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Stop the containers :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker container stop &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;container-id&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Remove the stopped containers :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker system prune&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;⚠️ Note :
You should avoid using unverified content from the Docker Store when developing your own images because these images might contain security vulnerabilities or possibly even malicious software.&lt;/p&gt;
&lt;h2&gt;Lab 2 Add CI/CD value with Docker images&lt;/h2&gt;
&lt;h3&gt;Docker images&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Docker image is a tar file containing a container’s filesystem + metadata&lt;/li&gt;
&lt;li&gt;for sharing and redistribution&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Docker registry&lt;/strong&gt; push and pull image from registry.
Default registry: Docker hub. Public and free for public images.&lt;/p&gt;
&lt;p&gt;You can also have a private registry, self-hosted, or cloud provider options.&lt;/p&gt;
&lt;p&gt;Creating a docker image - with Docker build&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a “Dockerfile”&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It contains a List of instructions for how to construct the container&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;docker build -f Dockerfile&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Secret Sauce: Docker image layers&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/8f362a809bd526391f0bf083d2690b56/d9199/2020-03-13-09-36-47.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 48.64864864864865%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB5UlEQVQoz3VSTW/TQBT0f+PMz0AcOHBA6gm4UPELeqOckJB6qbghceDQKiRN2gYIUiKSxnbjrOO149Tr783aw+7aCSgST3p6O7Z2PDPPxvxuDs/14C5duMQF9SiIQ3Bv3WO1WsFxHMzncywWC1iWBUopttstyrJEIbuuBJY0wJOzr3h3MYTBUgb3gcBZOzBXpp4Kk3CpL2VZBsZYQ1AUEELgsDgvIbIEeRLDSIsYFh3D9ieYLUeYOT/1eeFPkRc5oihCmqb4X9V13cwWGzzzUSc3qOIbJPQbirCvsUhG2MovK3u7S0qpbdsIgkBHoKZ6V1WVnqqNMvexZX2U0QCMdpCuexIPULLvkkxaEdXepiIYj8eYTqeYTCZa/aFao8woOOtJwh6i1QXSoNNgNpS55To3pUDVZrPRRKZp6g7DNXyfwpFqs6yJpVEYDyTJAJGnFHY1FulIKngAIWSvYLcYzvn+mTQgu/6bYWNZEV5LdT3km6vW8o/Wstgr3GWp6vb2GtbslxRhwVvcIQkpfGLvCK/Aoz6Yd4ks7ELEEkvLaimHhLs8j148x9n7tzg5eopnjx/h97CLyy/ncsu8QC0SCM6wCQkS5rc43v/A/xJWLeGb1y9xenKMzsdTnB+/QrfXx+dPH/AHHhXtwSCnmMcAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 13 09 36 47&quot;
        title=&quot;2020 03 13 09 36 47&quot;
        src=&quot;/static/8f362a809bd526391f0bf083d2690b56/fcda8/2020-03-13-09-36-47.png&quot;
        srcset=&quot;/static/8f362a809bd526391f0bf083d2690b56/12f09/2020-03-13-09-36-47.png 148w,
/static/8f362a809bd526391f0bf083d2690b56/e4a3f/2020-03-13-09-36-47.png 295w,
/static/8f362a809bd526391f0bf083d2690b56/fcda8/2020-03-13-09-36-47.png 590w,
/static/8f362a809bd526391f0bf083d2690b56/efc66/2020-03-13-09-36-47.png 885w,
/static/8f362a809bd526391f0bf083d2690b56/d9199/2020-03-13-09-36-47.png 960w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;to make pushes faster, the lines in the docker file that change the most should be at the bottom of the file.
Because when you invalidate a layer, you automatically invalidate the layers after it.
So if it is the last layer, we optimize the caching system.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;union file system&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;merge image layers into single file system for each container&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;copy-on-write&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;copies files that are edited up to top writable layer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Lab objectives :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;create custom image using a Dockerfile,&lt;/li&gt;
&lt;li&gt;build and run your image locally&lt;/li&gt;
&lt;li&gt;push your image to your account on DockerHub&lt;/li&gt;
&lt;li&gt;Update your image with a code change to see Docker image layering/caching in action&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Create a python app&lt;/h3&gt;
&lt;p&gt;Paste this in a file called app.py to create a simple Flask app :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;python&quot;&gt;&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;from&lt;/span&gt; flask &lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; Flask

app &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Flask&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;__name__&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token decorator annotation punctuation&quot;&gt;@app&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;route&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;hello&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;hello world!&quot;&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; __name__ &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;__main__&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    app&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;run&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;host&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;0.0.0.0&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;then run&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;pip3 &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; flask
python3 app.py&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt; Creating and building the docker image&lt;/h3&gt;
&lt;p&gt;Create a file named Dockerfile and add the following content:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;FROM python:3.6.1-alpine
RUN pip install flask
CMD [&amp;quot;python&amp;quot;,&amp;quot;app.py&amp;quot;]
COPY app.py /app.py&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The FROM line specifies the starting image to build your layers on top of it.
In this case, you are selecting the &lt;code class=&quot;language-text&quot;&gt;python:3.6.1-alpine&lt;/code&gt; base layer because it already has the version of Python and pip that you need to run your application.
he alpine version means that it uses the alpine distribution, which is significantly smaller than an alternative flavor of Linux. A smaller image means it will download (deploy) much faster.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is best practice to use a specific tag when inheriting a parent image so that changes to the parent dependency are controlled. If no tag is specified, the latest tag takes effect, which acts as a dynamic pointer that points to the latest version of an image.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt; For security reasons, you must understand the layers that you build your docker image on top of.&lt;/p&gt;
&lt;p&gt; The RUN command executes commands needed to set up your image for your application, such as installing packages, editing files, or changing file permissions. In this case, you are installing Flask. The RUN commands are executed at build time and are added to the layers of your image.&lt;/p&gt;
&lt;p&gt; CMD is the command that is executed when you start a container. Here, you are using CMD to run your Python application.
There can be only one CMD per Dockerfile. If you specify more than one CMD, then the last CMD will take effect.&lt;/p&gt;
&lt;p&gt; This line copies the app.py file in the local directory (where you will run docker image build) into a new layer of the image.&lt;/p&gt;
&lt;p&gt; It seems counter-intuitive to put this line after the CMD [“python”,“app.py”] line. Remember, the CMD line is executed only when the container is started, so you won’t get a file not found error here.&lt;/p&gt;
&lt;p&gt;For full specifications about the Dockerfile :&lt;a href=&quot;https://docs.docker.com/engine/reference/builder/&quot;&gt;documentation here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then, we can &lt;strong&gt;build the Docker image&lt;/strong&gt;.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker image build -t python-hello-world ./&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code class=&quot;language-text&quot;&gt;-t&lt;/code&gt; parameter allows us to name the image.&lt;/p&gt;
&lt;p&gt;then we can run&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker image &lt;span class=&quot;token function&quot;&gt;ls&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;to see our image !&lt;/p&gt;
&lt;h3&gt;Run the docker image&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker run -p &lt;span class=&quot;token number&quot;&gt;5001&lt;/span&gt;:5000 -d python-hello-world&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;it returns &gt; &lt;code class=&quot;language-text&quot;&gt;0a8fa98d3b930c7b2d986c76fdeaf6b86cf041343be804a33585ccc9aedf5958&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Navigate to &lt;a href=&quot;http://localhost:5001&quot;&gt;http://localhost:5001&lt;/a&gt; =&gt; you see “hello world!“.&lt;/p&gt;
&lt;p&gt;To see the logs :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker container logs 0a8fa98d3b930c7b2d986c76fdeaf6b86cf041343be804a33585ccc9aedf5958&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It returns :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt; * Serving Flask app &amp;quot;app&amp;quot; (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
172.17.0.1 - - [13/Mar/2020 09:10:34] &amp;quot;GET / HTTP/1.1&amp;quot; 200 -
172.17.0.1 - - [13/Mar/2020 09:10:34] &amp;quot;GET /favicon.ico HTTP/1.1&amp;quot; 404 -&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;The Dockerfile is used to create reproducible builds for your application. A common workflow is to have your CI/CD automation run docker image build as part of its build process. After images are built, they will be sent to a central registry where they can be accessed by all environments (such as a test environment) that need to run instances of that application. In the next section, you will push your custom image to the public Docker registry, which is the Docker Hub, where it can be consumed by other developers and operators.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Push to a central registry&lt;/h3&gt;
&lt;p&gt;Login to the docker registry :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker login&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Tag the image with you username.
The Docker Hub naming convention is to tag your image with &lt;code class=&quot;language-text&quot;&gt;[dockerhub username]/[image name]&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker tag python-hello-world nansdibm/python-hello-world&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Use docker push :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker push nansdibm/python-hello-world&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can see your image on docker hub in the browser.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/848475263751cb22a46c233ab9f67ef0/d7abb/2020-03-13-10-57-10.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 18.91891891891892%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAbUlEQVQY05WPyQqAMBBD+///6FFcq+LaztI4LXjwpgMPJoeExIkImBkUI4jIsN90Sgmq+gtmgfPThGXbUfUz6t6jaTsMo8dxniX0610hFI/LphAJ60VQ82edyc3/BD4e91Rlm6ryniDynZJjgTdJfjuKe9G3WwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 13 10 57 10&quot;
        title=&quot;2020 03 13 10 57 10&quot;
        src=&quot;/static/848475263751cb22a46c233ab9f67ef0/fcda8/2020-03-13-10-57-10.png&quot;
        srcset=&quot;/static/848475263751cb22a46c233ab9f67ef0/12f09/2020-03-13-10-57-10.png 148w,
/static/848475263751cb22a46c233ab9f67ef0/e4a3f/2020-03-13-10-57-10.png 295w,
/static/848475263751cb22a46c233ab9f67ef0/fcda8/2020-03-13-10-57-10.png 590w,
/static/848475263751cb22a46c233ab9f67ef0/efc66/2020-03-13-10-57-10.png 885w,
/static/848475263751cb22a46c233ab9f67ef0/d7abb/2020-03-13-10-57-10.png 959w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Deploy a change&lt;/h3&gt;
&lt;p&gt;Update app.py by changing “Hello World” with “Hello Beautiful World!“.&lt;/p&gt;
&lt;p&gt;Rebuild the image&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;docker image build -t nansdibm/python-hello-world .&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Notice the “Using cache” for Steps 1 - 3. These layers of the Docker image have already been built, and the docker image build command will use these layers from the cache instead of rebuilding them.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker push nansdibm/python-hello-world&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;The push refers to repository [docker.io/nansdibm/python-hello-world]
bd3dadabc6d3: Pushed
455874a92037: Layer already exists
5f354b8b5dc0: Layer already exists
f61107386c17: Layer already exists
db49993833a0: Layer already exists
58c71ea40fb0: Layer already exists
2b0fb280b60d: Layer already exists&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There is a caching mechanism in place for pushing layers too. Docker Hub already has all but one of the layers from an earlier push, so it only pushes the one layer that has changed.&lt;/p&gt;
&lt;h3&gt; Understanding image layers&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;FROM python:3.6.1-alpine
RUN pip install flask
CMD [&amp;quot;python&amp;quot;,&amp;quot;app.py&amp;quot;]
COPY app.py /app.py&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Each of these lines is a layer. Each layer contains only the delta, or changes from the layers before it. To put these layers together into a single running container, Docker uses the union file system to overlay layers transparently into a single view.&lt;/p&gt;
&lt;p&gt;The “copy-on-write” function is very fast and in almost all cases, does not have a noticeable effect on performance. You can inspect which files have been pulled up to the container level with the docker diff command. For more information, see the command-line reference on the docker diff command.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker &lt;span class=&quot;token function&quot;&gt;diff&lt;/span&gt; 0a8fa98d3b93&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Because image layers are read-only, &lt;strong&gt;they can be shared by images and by running containers&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 513px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/f47cc9b9642fc2111eda6de12919b63a/267f6/2020-03-13-11-20-10.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 67.56756756756756%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAACGUlEQVQ4y5VSiZLaMAzl/7+rx3baGY5dlkIuEpJA7JCbxElsXmXDsj2gnWZG82RLepLzNOGco6oqZFmGsizRtq2xruvMuSgKSCmhv/P5jH99E8uy4Ps+4jhGEAQIwxBpmhp0HAd1Xf8foed5NwJNrCfmdNb3YRShaZpfCH+2e00mW88FZwlcx8Yu8On5JfytR4QuYiKU40BV6pr+Xvw7+RvxJG8GlKcBed2jIL8gP6sEykbQnUDdKdRCGWzEGVUr0XTy7nM16cRKJF62FT4/7/BlGWNmH+EwBY/1cNmIVdjh4zzA00tEOSHWcY91eEJR1oZECGFE7Pv+MmGUjYiyAbtUwDs0CHiHOJfYZwL7fDT+jgv4SWvi+hxnPU5th2Ggpq6L2WwGxtiFcLnNsbAZXtwU611pcOXnVDjCiirMrcTcfQ8KLL2j8e24RlnVUEohz3PoTblN+OoXpmhhcyIqLuRUqKe2o/oaY7fYwuHYUOO2E/f/ISsljs0Zaa3AK0koCUewogcrR3P/Hrv4R8q5Ls2fKluHkUQgS0a4XOHZK/Bp7pMIIT5MPYObvSCBpMnR5rEBo1QP9pAJBGlPYlwwyhV2Ry3SYM7aD0k4X8d5T9gjPApI9WCx7WSgjtSVS9iHHk96fWiqr68xphbHt9Ue0w3DNlVmjbRt+V8m1BNcVmekzgOssDBmRyXcfQ3nilp1LZTO2+fDwwl/ABZlK0pbHk1/AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 13 11 20 10&quot;
        title=&quot;2020 03 13 11 20 10&quot;
        src=&quot;/static/f47cc9b9642fc2111eda6de12919b63a/267f6/2020-03-13-11-20-10.png&quot;
        srcset=&quot;/static/f47cc9b9642fc2111eda6de12919b63a/12f09/2020-03-13-11-20-10.png 148w,
/static/f47cc9b9642fc2111eda6de12919b63a/e4a3f/2020-03-13-11-20-10.png 295w,
/static/f47cc9b9642fc2111eda6de12919b63a/267f6/2020-03-13-11-20-10.png 513w&quot;
        sizes=&quot;(max-width: 513px) 100vw, 513px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Because the containers use the same read-only layers, you can imagine that starting containers is very fast and has a very low footprint on the host.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt; Remove the containers&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker container &lt;span class=&quot;token function&quot;&gt;ls&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker container stop 0a8fa98d3b93&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker system prune&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Lab 3 Orchestrate applications with Docker Swarm&lt;/h2&gt;
&lt;h3&gt; Container orchestration&lt;/h3&gt;
&lt;p&gt;What about production ?
Automated scheduling and scaling, zero downtime deployments, high availability and fault tolerance…&lt;/p&gt;
&lt;p&gt;What is container orchestration ?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cluster management&lt;/li&gt;
&lt;li&gt;Scheduling&lt;/li&gt;
&lt;li&gt;Service discovery&lt;/li&gt;
&lt;li&gt;Health management&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Declare desired state&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Active reconciliation&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Docker swarm, Kubernetes, …
With hosted solutions :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IBM Cloud Container Services&lt;/li&gt;
&lt;li&gt;Amazon ECS&lt;/li&gt;
&lt;li&gt;Azure Containers&lt;/li&gt;
&lt;li&gt;Google …&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Setup a 3 node cluster with container orchestration with Docker Swarm.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Schedule and scale an application&lt;/li&gt;
&lt;li&gt;Expose the application&lt;/li&gt;
&lt;li&gt;Update with a rolling update&lt;/li&gt;
&lt;li&gt;Demonstrate node failure and reconciliation&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt; Create your first swarm&lt;/h3&gt;
&lt;p&gt;Using &lt;a href=&quot;https://labs.play-with-docker.com/&quot;&gt;https://labs.play-with-docker.com/&lt;/a&gt;
Create a new instance&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker swarm init --advertise-addr eth0&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To add a worker in this swarm :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker swarm &lt;span class=&quot;token function&quot;&gt;join&lt;/span&gt; --token SWMTKN-1-61p9nb8opn3tg8lchklkbyjz7uhysj8krjexrlaxpr3kaprte8-ex2t37ry9f8ux0xu92u3jfsm8 &lt;span class=&quot;token number&quot;&gt;192.168&lt;/span&gt;.0.8:2377&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To add a manager :&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker swarm join-token manager&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;You can think of Docker Swarm as a special mode that is activated by the command: docker swarm init. The —advertise-addr option specifies the address in which the other nodes will use to join the swarm.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;With other instances, you can join the swarm by running&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker swarm &lt;span class=&quot;token function&quot;&gt;join&lt;/span&gt; --token SWMTKN-1-61p9nb8opn3tg8lchklkbyjz7uhysj8krjexrlaxpr3kaprte8-ex2t37ry9f8ux0xu92u3jfsm8 &lt;span class=&quot;token number&quot;&gt;192.168&lt;/span&gt;.0.8:2377&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Back on node1, run&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker node &lt;span class=&quot;token function&quot;&gt;ls&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt; Deploy your first service&lt;/h3&gt;
&lt;p&gt;To run containers on a Docker Swarm, you need to create a service. A service is an abstraction that represents multiple containers of the same image deployed across a distributed cluster.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The —mount flag is useful to have NGINX print out the hostname of the node it’s running on. You will use this later in this lab when you start load balancing between multiple containers of NGINX that are distributed across different nodes in the cluster and you want to see which node in the swarm is serving the request.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker &lt;span class=&quot;token function&quot;&gt;service&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;ls&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker &lt;span class=&quot;token function&quot;&gt;service&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;ps&lt;/span&gt; nginx1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Scale your service&lt;/h3&gt;
&lt;p&gt;Update your service with an updated number of replicas.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker &lt;span class=&quot;token function&quot;&gt;service&lt;/span&gt; update --replicas&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;5&lt;/span&gt; --detach&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;true nginx1
nginx1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;The state of the service is updated to 5 replicas, which is stored in the swarm’s internal storage.&lt;/li&gt;
&lt;li&gt;Docker Swarm recognizes that the number of replicas that is scheduled now does not match the declared state of 5.&lt;/li&gt;
&lt;li&gt;Docker Swarm schedules 4 more tasks (containers) in an attempt to meet the declared state for the service.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker &lt;span class=&quot;token function&quot;&gt;service&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;ps&lt;/span&gt; nginx1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/4ab19d0fde948f11ae1221935efcb148/318d8/2020-03-13-14-28-44.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 10.135135135135135%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAgUlEQVQI1z2LOwoDIQBEjRE/q9goSMJuIeKmEgvvIXiWkDZN9t6TrEWqGd68Ie/nC0oShO2G+xZxuTJIKaGUAiEExpiZjDE452ZqreG9hxACnPO/O8YA+RwH1nWDXhY89n0OIQTknEEpRUppMmstSimzxxhRa0VrDcvvd3on773jC8b4MxTCTXAjAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 13 14 28 44&quot;
        title=&quot;2020 03 13 14 28 44&quot;
        src=&quot;/static/4ab19d0fde948f11ae1221935efcb148/fcda8/2020-03-13-14-28-44.png&quot;
        srcset=&quot;/static/4ab19d0fde948f11ae1221935efcb148/12f09/2020-03-13-14-28-44.png 148w,
/static/4ab19d0fde948f11ae1221935efcb148/e4a3f/2020-03-13-14-28-44.png 295w,
/static/4ab19d0fde948f11ae1221935efcb148/fcda8/2020-03-13-14-28-44.png 590w,
/static/4ab19d0fde948f11ae1221935efcb148/efc66/2020-03-13-14-28-44.png 885w,
/static/4ab19d0fde948f11ae1221935efcb148/c83ae/2020-03-13-14-28-44.png 1180w,
/static/4ab19d0fde948f11ae1221935efcb148/318d8/2020-03-13-14-28-44.png 2758w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker &lt;span class=&quot;token function&quot;&gt;service&lt;/span&gt; logs nginx1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;Apply rolling updates&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker &lt;span class=&quot;token function&quot;&gt;service&lt;/span&gt; update --image nginx:1.13 --detach&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;true nginx1&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/a364151a1472cc7fdc3974f37cfca7ce/2d86d/2020-03-13-14-33-06.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 29.72972972972973%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA20lEQVQY042RS5KDMAxEzR/MNwk2BiZVc4AMsJ37H0yhO+WUs8tCpZYlPcuy+n885GK1uPtd3M+vqCiRIs+lKApRStHHcUxd17U0TcMY3mvkqqp66b9jl1qfiSiS2/Uq0enRaIxh4TAMUpYl9TzP0nUd9bIsNNShJkkSnqtj36Xve9KNsZJlGW8bx5EFAHigtVa01tTTNDFe1/Wdp23bFgCNpGnKJg9EzjcAgum9hgGIIT6Abdty5G+A4YQwrMFf8nrycXAH2B2A+fkhIRBP9h8UTuicY4w9hk9+Am+siQHCjy44AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 13 14 33 06&quot;
        title=&quot;2020 03 13 14 33 06&quot;
        src=&quot;/static/a364151a1472cc7fdc3974f37cfca7ce/fcda8/2020-03-13-14-33-06.png&quot;
        srcset=&quot;/static/a364151a1472cc7fdc3974f37cfca7ce/12f09/2020-03-13-14-33-06.png 148w,
/static/a364151a1472cc7fdc3974f37cfca7ce/e4a3f/2020-03-13-14-33-06.png 295w,
/static/a364151a1472cc7fdc3974f37cfca7ce/fcda8/2020-03-13-14-33-06.png 590w,
/static/a364151a1472cc7fdc3974f37cfca7ce/efc66/2020-03-13-14-33-06.png 885w,
/static/a364151a1472cc7fdc3974f37cfca7ce/c83ae/2020-03-13-14-33-06.png 1180w,
/static/a364151a1472cc7fdc3974f37cfca7ce/2d86d/2020-03-13-14-33-06.png 2578w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Reconcile problems with containers&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;docker swarm leave&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/5474d319b64e887f614cfa02d3050641/81386/2020-03-13-14-37-27.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 17.567567567567565%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAsUlEQVQY01WOTQtGUBSEiRIKSclVVhZWomTj7yifWcjCvx/vmbq33lvTPHeazjnW8zy47xvi13VhXVcsy4Jt2yj5az6OA+d5kvd9p8/zzOx9X86xfg9JkghQQRAY9jzPsOu6f700TRHHMRzHMRklxa7rUFUVbNtG27ZomoYsnuc5i3Vdo+97slIKwzBgHEdM0wTf981SXphlGaIogmZ9iVyhy5Lp4WEYkouiQFmWehD1AT+/ctCe23QgAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 13 14 37 27&quot;
        title=&quot;2020 03 13 14 37 27&quot;
        src=&quot;/static/5474d319b64e887f614cfa02d3050641/fcda8/2020-03-13-14-37-27.png&quot;
        srcset=&quot;/static/5474d319b64e887f614cfa02d3050641/12f09/2020-03-13-14-37-27.png 148w,
/static/5474d319b64e887f614cfa02d3050641/e4a3f/2020-03-13-14-37-27.png 295w,
/static/5474d319b64e887f614cfa02d3050641/fcda8/2020-03-13-14-37-27.png 590w,
/static/5474d319b64e887f614cfa02d3050641/efc66/2020-03-13-14-37-27.png 885w,
/static/5474d319b64e887f614cfa02d3050641/c83ae/2020-03-13-14-37-27.png 1180w,
/static/5474d319b64e887f614cfa02d3050641/81386/2020-03-13-14-37-27.png 2640w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt; Determine how many nodes you need&lt;/h3&gt;
&lt;p&gt;For a production application, you should provision a cluster with multiple manager nodes to allow for manager node failiures.
At least 3 manager nodes, but no more than 7.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;3 manager nodes tolerate 1 node failure&lt;/li&gt;
&lt;li&gt;5 manager nodes tolerate 2 node failures&lt;/li&gt;
&lt;li&gt;7 manager nodes tolerate 3 node failures&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Play with docker Templates :
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/093f44248b2756f022c1da03e8c9f2fe/229ad/2020-03-13-14-42-38.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 86.48648648648648%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAACXBIWXMAABYlAAAWJQFJUiTwAAACQ0lEQVQ4y61STW8SURSdvX/BX1Hj0oUrky4bV5Vo3Fg1xp1uugIMpD+gLjRpYkggYFMD6cJFq0mrUGNLrEYqzJQMMEKnIwYYvgZm5vjug5kS6JjGeMMJ775357z7zj3Ck+WX8N1/g7uP1nH74TpuLb3+JywubeDx01cQfPfWcG0hg3nfB1y/uYO5G9u44oG5MWbPtnB1fhcLdxIQItFNHHzTkf6sInNwir3sCJ+yGscege/TP+2dnbk17Hz/sInkZgbC+3db+F9RyH+HsLr6nCcnJ6fI5Y5QKEgoFmXIcgmVigJJKiL3I49ftSpW0goW13YwGAxhmrYLg+UUyVQKQjAY5Em/32eFAxiGwTEcDl0YbB+wsfJRwoPUIQzTYqnNfiNQDUUsFoMQDoddQsuy2I2mJwCL11psTUQUk4SJBBtKKBTiSa/X4x3aEzeb4w/pIgKF2jY8CePx+FmHmqYhn89DFEWmYRHlcpmjWq1ClI5RlY+xcaTi8rO32Jdro04te5YwEAjwZMB1gtvNZKf0IcVXtYnQrghF77vdzRD6/X73yZPPm4E5dO1hs7VziSdhp9NBo9FAu93m6263y9ctXUeHoWmYSJcb6LHh2Q7xWMdzCVutFkqlEvOfzPxXgaqqqNfrUJiGv2sKXmQruLScxBdF4/WmZZ//ZEdDZ9MrfupdbMsa2gOTe3Lc3N81pMFMght7vGYiciLS0uJstvtkx1Lchw7htAenQSTm1PSdIZJcFNFodJbwouHUkvlJe/JxJBLBH6jhw28F8UqmAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 13 14 42 38&quot;
        title=&quot;2020 03 13 14 42 38&quot;
        src=&quot;/static/093f44248b2756f022c1da03e8c9f2fe/fcda8/2020-03-13-14-42-38.png&quot;
        srcset=&quot;/static/093f44248b2756f022c1da03e8c9f2fe/12f09/2020-03-13-14-42-38.png 148w,
/static/093f44248b2756f022c1da03e8c9f2fe/e4a3f/2020-03-13-14-42-38.png 295w,
/static/093f44248b2756f022c1da03e8c9f2fe/fcda8/2020-03-13-14-42-38.png 590w,
/static/093f44248b2756f022c1da03e8c9f2fe/efc66/2020-03-13-14-42-38.png 885w,
/static/093f44248b2756f022c1da03e8c9f2fe/c83ae/2020-03-13-14-42-38.png 1180w,
/static/093f44248b2756f022c1da03e8c9f2fe/229ad/2020-03-13-14-42-38.png 1356w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Docker Swarm schedules services by using a declarative language. You declare the state, and the swarm attempts to maintain and reconcile to make sure the actual state equals the desired state.&lt;/li&gt;
&lt;li&gt;Docker Swarm is composed of manager and worker nodes. Only managers can maintain the state of the swarm and accept commands to modify it. Workers have high scalability and are only used to run containers. By default, managers can also run containers.&lt;/li&gt;
&lt;li&gt;The routing mesh built into Docker Swarm means that any port that is published at the service level will be exposed on every node in the swarm. Requests to a published service port will be automatically routed to a container of the service that is running in the swarm.&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Lambda training]]></title><description><![CDATA[Learn AWS Lambda and see real world example with serverless main documentation : https://serverless.com/ What is lambda functions
limited by…]]></description><link>http://nans-dumortier.com/lambda-training/</link><guid isPermaLink="false">http://nans-dumortier.com/lambda-training/</guid><pubDate>Wed, 11 Mar 2020 15:15:00 GMT</pubDate><content:encoded>&lt;h1&gt;Learn AWS Lambda and see real world example with serverless&lt;/h1&gt;
&lt;p&gt;main documentation : &lt;a href=&quot;https://serverless.com/&quot;&gt;https://serverless.com/&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;What is lambda&lt;/h2&gt;
&lt;p&gt;functions
limited by time
run on demand
scaling is automated -&gt; that’s why we call it “Serverless”&lt;/p&gt;
&lt;h2&gt;Pricing&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;pay per request&lt;/li&gt;
&lt;li&gt;pay per compute time&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;AWS Lambda integrations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;API Gateway -&gt; to build a REST API&lt;/li&gt;
&lt;li&gt;Kinesis -&gt; processing data in streams&lt;/li&gt;
&lt;li&gt;DynamoDB -&gt; Managed NoSQL database&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Example : Thumbnail creation&lt;/h2&gt;
&lt;p&gt;“Database Trigger-like” behavior for S3
New image in S3 -&gt; trigger -&gt; AWS Lambda function creates a thumbnail and push it to S3&lt;/p&gt;
&lt;p&gt;/!\ the handler is the name of function that will be called in lambda
The instructor only did a “hello world”.&lt;/p&gt;
&lt;h2&gt;The Serverless Framework&lt;/h2&gt;
&lt;p&gt;Aims to ease the pain of creating, deploying, managing and debugging lambda functions.
Integrates with CI/CD tools.
CloudFormation support (templates for deploying).&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;install&lt;/span&gt; -g serverless&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;IAM =&gt; Create a serverless-admin (new user). Programmatic access, and give administrator access. (not best practice though …)&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;serverless config credentials --provider aws --key XXX --secret YYY --profile serverless-admin&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Hello world using the Serverless framework&lt;/h2&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;serverless&lt;/code&gt; or &lt;code class=&quot;language-text&quot;&gt;sls&lt;/code&gt; =&gt; list of commands.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;sls create --template aws-python --path hello-world-python&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;serverless.yml add&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;yml&quot;&gt;&lt;pre class=&quot;language-yml&quot;&gt;&lt;code class=&quot;language-yml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;profile&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; serverless&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;admin
&lt;span class=&quot;token key atrule&quot;&gt;region&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; eu&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;west&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;sls deploy -v&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;the code is uploaded to s3, and then CloudFront is configured. IAM role is created for us.&lt;/p&gt;
&lt;h2&gt;Running a function from the command line&lt;/h2&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;sls invoke -f hello -l&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt; Updating the function&lt;/h2&gt;
&lt;p&gt;change the &lt;code class=&quot;language-text&quot;&gt;print&lt;/code&gt; statement.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;sls deploy &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; -f hello&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;=&gt; how to integrate that with a proper CI/CD system ?&lt;/p&gt;
&lt;h2&gt;Fetching function logs&lt;/h2&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;sls logs -f hello -t&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;enables to stream function logs as they happen !&lt;/p&gt;
&lt;h2&gt; Remove the function&lt;/h2&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;sls remove&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;add an IAM role statement to a function&lt;/h2&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;yaml&quot;&gt;&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;iamRoleStatements&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token key atrule&quot;&gt;Effect&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Allow&quot;&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;Action&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;lambda&quot;&lt;/span&gt;
    &lt;span class=&quot;token key atrule&quot;&gt;Resource&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;*&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;VPC for lambda functions&lt;/h2&gt;
&lt;p&gt;can launch a lambda in a VPC so that they can access EC2 instances or RDS instances.
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/476c69b5b3a4417a66582a1433c7ff75/cd7c1/2020-03-12-11-14-30.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 37.83783783783784%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsTAAALEwEAmpwYAAABsUlEQVQoz11SyW7UQBD1VyHBGXHlwAnBryDgAkeQEBKXAEKIcIAv4EJCSAYCUTSXwTMDGtvtZRy73YuXtmd5VHeIFFFSya/eUt2W7QFbXK7tdguzWmOgtsXLAkGwcHizIW1YY7Xe4P8aiLO692ep4ScKs1RjwiTSqnWGnhb+XjY4nkTYP5liEisUyjitMSv8onlKmSllfcK87u114N1+doLrj0a48/wnrt7/iocffReKihY3Ho9w88kP3H1xiiv3DvDqc+C0b3PuvLeeHru+9uAQn8ZLp3kfvqd4/YXh/SjBzj7D3qR0guxWeHsY480Bw+5RjJ09htNQOY3xjuYI74jfPUrwknKzTJ8vNLWA0Ry1OENDrWWJIIyQpgk64o2uIMsMirrIM8RJgoqX6OsKmucQRUq+EqZrzhf60xl03aASEryShGtwziGEgJAKUmniBUpe0SyhlELTtlC6xllROt5m+2H4t9D3sVgs6EsGSOh021mWYT6fOy4MQ8RxjDzP3Wyx1W3GeqMoAmOM3ih1f4g3Ho+dYaATuq6DMQZ936OlW1h80Za7jK3XZi54+7QL/wJQKEvMrdVs5gAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 11 14 30&quot;
        title=&quot;2020 03 12 11 14 30&quot;
        src=&quot;/static/476c69b5b3a4417a66582a1433c7ff75/fcda8/2020-03-12-11-14-30.png&quot;
        srcset=&quot;/static/476c69b5b3a4417a66582a1433c7ff75/12f09/2020-03-12-11-14-30.png 148w,
/static/476c69b5b3a4417a66582a1433c7ff75/e4a3f/2020-03-12-11-14-30.png 295w,
/static/476c69b5b3a4417a66582a1433c7ff75/fcda8/2020-03-12-11-14-30.png 590w,
/static/476c69b5b3a4417a66582a1433c7ff75/efc66/2020-03-12-11-14-30.png 885w,
/static/476c69b5b3a4417a66582a1433c7ff75/c83ae/2020-03-12-11-14-30.png 1180w,
/static/476c69b5b3a4417a66582a1433c7ff75/cd7c1/2020-03-12-11-14-30.png 1547w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;
can specify securityGroupIds and subnetsId in the serverless.yml file.&lt;/p&gt;
&lt;h2&gt;Real world example : Service to create S3 image thumbnails&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b6876527bbb55d54e53bf1a89db4e260/4597d/2020-03-12-11-20-44.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 55.4054054054054%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB+0lEQVQoz31Ru47TQBT1d1DR09DyAUjbIdFQQIXEL9AulKyQeEgIhJBAoqBCERJQ0KDEdsRuh7SY2ImdOORBluDY47Ezfh7uzOKVQQtXOvad+zhz7h2t0+mg3++j2+3CMAwF0zTR6/Wg67qKS7/JyVgDVUu9pqHD/PgBPd2AFgQB8jzHYDCAP5nAcRxM6O/7PjzPU/6Xw0O4rqtqbNvGaDSCSxhSbVGUUDbbp08BTRZkQiBiDPF2izAMFRidoygCTwXFC4Tkh+FG5WQ8TlMwzhHHMRK2AV84iI7m0KQKaQmLEPkeqrJEVVXHqCm+XmBjGaiKjGI1SpmnOFvOwVffya9JZQGpU2Q5NH88VoTO0wd4de4MAtsi4UCw/gHqw/D5TXy6cRZi/hV8myNJuFqRcWUHb69dUr11LSvlZTSy3Ju01UEfn/duYxv8REn5lBqlhZaO5Zs9IIuVsqoqUZD60YvHsF4+axFCKdWm06k6CJGgKAXKLEVjy8UClj3EwPUxcr2TRrnDdcQU5O4bU4Tz2TdwUeLyPQMXdt/j6qMe8kyogoxGi6mBxwR+rLj6TXqrc4CH7/aVX5LiE8LFbIZY5Lh4v4Pzd17j+t0nEEmE00wqbFSOVyvMj5b/HpmFUxR8jJr56oXbBG2iNsHfl/xBeJqa/ymUozfjtwl/AVHVMOc8bTJwAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;image thumbnail workflow&quot;
        title=&quot;image thumbnail workflow&quot;
        src=&quot;/static/b6876527bbb55d54e53bf1a89db4e260/fcda8/2020-03-12-11-20-44.png&quot;
        srcset=&quot;/static/b6876527bbb55d54e53bf1a89db4e260/12f09/2020-03-12-11-20-44.png 148w,
/static/b6876527bbb55d54e53bf1a89db4e260/e4a3f/2020-03-12-11-20-44.png 295w,
/static/b6876527bbb55d54e53bf1a89db4e260/fcda8/2020-03-12-11-20-44.png 590w,
/static/b6876527bbb55d54e53bf1a89db4e260/4597d/2020-03-12-11-20-44.png 631w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;S3 events&lt;/li&gt;
&lt;li&gt;plugins to deploy python dependencies (docker needed)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Triggering a function from an s3 event :
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 537px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/dc0405749be0341f90a42e30afb5d368/b1cde/2020-03-12-11-27-59.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 52.02702702702703%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABt0lEQVQoz31S226jMBTMh6QJ+AbY2IAJt4TmtpsmVaVK+7La//+R2WNyUSpVfRidY2MPM2c805nGWuboucaGG2yVRZqliAUHlwIxgd3AhYCU8kfMMp2hlCn2IsdBWLyrEoekQM1T1FGKdWTQMo02pnPKgHGJKGKIGZ8QRVTjKxgTgVBDKIlSJHjlOU7M4kjoTY6PscafscGucjj6AoehwjgW2G1LdG2OtsnxSuuutVgPDrU3mGkiDFJTpfCv6PHXtTi3HXzr0Q85ms7AVaTOZ6gIQx9IHJqVmbClvm0MOkJZpE+EUuG3r/HpG1zWA0zp8LKMJ3vR8gayt6A6f4mxpBown8dYLNhXy4rUCRp4pAS0TDCoHJZGUMsMhgKqqvB3jcJlcATvr+uAZmUnq0rdQtFPhErIKd1OaLxxh5MsMTQVLmdSfWpw3HucT9f+8rbC+/m6N3R2IgscXwjDZngqQdkvbtGmFp4U9HRhvy0wbiiAxmJcF1MYGwoiSeRk9/FsviMsyO6OEt+lBfIkg6TZcC4mW+EcY/yB+71Qv1V4/5jQ+9xIQ0op1dTBOkMWV6Qwf5A/n7/3/wEfdy27/6pabwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 11 27 59&quot;
        title=&quot;2020 03 12 11 27 59&quot;
        src=&quot;/static/dc0405749be0341f90a42e30afb5d368/b1cde/2020-03-12-11-27-59.png&quot;
        srcset=&quot;/static/dc0405749be0341f90a42e30afb5d368/12f09/2020-03-12-11-27-59.png 148w,
/static/dc0405749be0341f90a42e30afb5d368/e4a3f/2020-03-12-11-27-59.png 295w,
/static/dc0405749be0341f90a42e30afb5d368/b1cde/2020-03-12-11-27-59.png 537w&quot;
        sizes=&quot;(max-width: 537px) 100vw, 537px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;plugin :
serverless-python-requirements
it installs what’s written in requirements.txt file.
Pillow =&gt; import PIL&lt;/p&gt;
&lt;h2&gt;Real world example : REST API with API Gateway and DynamoDB&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b5b41995e89f79dca6fd564651c701c0/374ac/2020-03-12-11-54-44.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 56.08108108108109%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAABzklEQVQoz4VTTW+bQBDlX/Zv9A/0YFU9VOo9h1x7aFUpbVWp19wSOZYCpVjYWIAhxgbLdsF8LrB+3VlsN8iqMtKIYffx5s3bRZlMJrBtG4ZhgGrTNDGdTjEej2VNOXp4gKaq0DQNw+FQYlXxPp/P8bRYwHdtBFMV6i8dCmMMeZ5LMtd1JQEBqZ7NZvBErQmgaXbNiMhxHIk/HA6Q0ZaAf4dtuICyWq1QlqXMoih6z6qqRDJkG4FJEzBWo67ZeS/LMplpvEORbODMJlD2+71swnkrO56SgohZXcO6fo3Uuu9w7T9cy3lXdzoRrddQkiTB8ziPIYJUtPwA7+sH5L5x3OcXOM67tTAMhcI0FV1rjH68RbbznqnlaJpGdnc/DZC7j2eFJ4IvtwasxZ8zsSRM0wysKnD3/R3itQMhSHgllIkPSSER2h/fIHceZV2VhfSS4tXgBj9HXp+QPKST3sUFsrzsjUPmNy2Hf/Mehad3e0d11DCKQuy22z5hHMc9D2kcfjSbTrAsKzhi5Mzpj0zZNLW05WQB3RiFTvJ/UdfdaP7nAdiTjpdiK9QqlmVJqcvl8iI9zxN/QoDf367g6fdYrTdYBsEFLhBrURRB13X8BRA8PodA16+ZAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 11 54 44&quot;
        title=&quot;2020 03 12 11 54 44&quot;
        src=&quot;/static/b5b41995e89f79dca6fd564651c701c0/fcda8/2020-03-12-11-54-44.png&quot;
        srcset=&quot;/static/b5b41995e89f79dca6fd564651c701c0/12f09/2020-03-12-11-54-44.png 148w,
/static/b5b41995e89f79dca6fd564651c701c0/e4a3f/2020-03-12-11-54-44.png 295w,
/static/b5b41995e89f79dca6fd564651c701c0/fcda8/2020-03-12-11-54-44.png 590w,
/static/b5b41995e89f79dca6fd564651c701c0/374ac/2020-03-12-11-54-44.png 634w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Lambda functions are stateless, they don’t keep anything in memory, so they will write to DynamoDB.&lt;/p&gt;
&lt;p&gt;package.json =&gt; like requirements.txt&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;yaml&quot;&gt;&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;environment&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;token key atrule&quot;&gt;DYNAMODB_TABLE&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; $&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;self&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;service&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;-&lt;/span&gt;$&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;opt&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;stage&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; self&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;provider.stage&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/26777e86bb8e1c783800d5c64bb36040/ee515/2020-03-12-13-56-44.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 27.7027027027027%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAvklEQVQY05WR/QqCQBDEfRX11tTUO88zKfrAyLR6/+eZXPUsKqL++DEzyzIsrHP1JRqS0EGMPI+hZIRcxdC9Z+Usp5nNQggQ0cCzZ5xGZKgpwzZNEUULhGHQ6wPO82zyXwslhdhXCtUmQZaG8H0xLLFa/5qJPheydygI0DYGt67EYafeLviXsbA1uPR05xLrKoPr+vC8Eb7K+l9wNEWojUJ9yHGsCzQnM5QWOoEpEqj+EYVeDp5nllWZzjtWmTtlSrLx7eY+FgAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 13 56 44&quot;
        title=&quot;2020 03 12 13 56 44&quot;
        src=&quot;/static/26777e86bb8e1c783800d5c64bb36040/fcda8/2020-03-12-13-56-44.png&quot;
        srcset=&quot;/static/26777e86bb8e1c783800d5c64bb36040/12f09/2020-03-12-13-56-44.png 148w,
/static/26777e86bb8e1c783800d5c64bb36040/e4a3f/2020-03-12-13-56-44.png 295w,
/static/26777e86bb8e1c783800d5c64bb36040/fcda8/2020-03-12-13-56-44.png 590w,
/static/26777e86bb8e1c783800d5c64bb36040/efc66/2020-03-12-13-56-44.png 885w,
/static/26777e86bb8e1c783800d5c64bb36040/c83ae/2020-03-12-13-56-44.png 1180w,
/static/26777e86bb8e1c783800d5c64bb36040/ee515/2020-03-12-13-56-44.png 1269w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/04f26bead323c0d75b7ad011887be5cb/43fbc/2020-03-12-13-58-10.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 60.810810810810814%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACDklEQVQoz1WSa5LbIBCEfYxY9tqSACGEQG/r4VpHzia1lb3/fToz2HJtfkxRQsxHTze7fRRhvPRYLh2SJMXb2xuOx2NYD4cDqqpCWZbopMFNWMy6hMoypKlAQsWrEPK17n7sDyh1jK+fHYz1iM/nFzCiy263BdfrBbnOcBcl7lkFm+cYBodlbjH0Dm1jcaFv7w0BowO8Efi7DogT8YJtwGUeaYIOIpPoSeVnVqMxFkWpUXlL6vNQzuUojH4oZODX2kMojdPp9N/IdV1Tg4OUEplS6LIC78rB5A+Qoj0eNRSd2UXUXKUxxraGJa++A1lh3/fBRyVVgCqq38Lhw9T4/NPTqBYpwRjMtYtIRUmHa2rixjN5yMo2YNe1YV8qMl6KAB5p9C53aPwUlIaLNmCSphhorGWesSwLrKUbaY8PJUlCwA7Oe2gCNcogo4T5H18gn6of9QRqrXGdJkrIU3JDaGB1cRyHtW3b8I+bbqoM/vm8wDRSypND11r03SOc8GwYOBLQGBPU8ZvbAtnv9wRsKE2PlBS1Mn+knFtITeoIkGUKmp4Uq+NLA3CmcRnGifI3+8jFAfV9Rx764J0gaEEv4S7Jv4Ie+exgCx2Uyc1DHnF6KmTzi6II0K04ZefcSwGDf/EDz2t8rCO8MwH4UsigdV3DqNzcNE1Qto08DH1QvpnPjTx6RWM7S56T4u8p/wM5LmGs3lBmMAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 13 58 10&quot;
        title=&quot;2020 03 12 13 58 10&quot;
        src=&quot;/static/04f26bead323c0d75b7ad011887be5cb/fcda8/2020-03-12-13-58-10.png&quot;
        srcset=&quot;/static/04f26bead323c0d75b7ad011887be5cb/12f09/2020-03-12-13-58-10.png 148w,
/static/04f26bead323c0d75b7ad011887be5cb/e4a3f/2020-03-12-13-58-10.png 295w,
/static/04f26bead323c0d75b7ad011887be5cb/fcda8/2020-03-12-13-58-10.png 590w,
/static/04f26bead323c0d75b7ad011887be5cb/43fbc/2020-03-12-13-58-10.png 797w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;POST on /todos =&gt; call create function
this is wired to the API gateway&lt;/p&gt;
&lt;p&gt;under resources, you can specify the cloud formation template&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/a67310fb16b163e9cc3aea7c78bfc8b0/41d3b/2020-03-12-14-04-26.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 68.91891891891892%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAABt0lEQVQ4y51T23KbMBT0pzjoSEiAhAwpGBzHGF/a5qGP7XT6/9+xXeg4nSbTCcnDjo4YsTq7e7Ty1qGTDPfKwhuLtSgk6g+UCLTWzxDu5cW3l1jZNMXJBHzzDZ6qLdoQUWUedRGQ8bIkIXki8wVLSFc6Ncidw/d2jx/9gJ/jAb/OEwZ8Pe7gg0VdFYgxX9ihtbijzF5ynCRgCAGnTYldHXD9XONyrnBfZwjevkn2TDh59UkczuIxJh6POiAkKUpKjuxei6ZkWSZ5IpwOGP601Tlanc3dtgyqYlBN4uAYlmiZiRd1eLt1bQQb7VCJxY6ke0XvfD77KOptuf92yE0mBgNJLvTyTNmXJKAtAwr6p95LmFJObwp0lN2YHInRWE+zOOOvf++SfEfJkZI3k2RdYDAeG19QsvuYZDdJlgJfVIkxj3h6qNDSQ8dZlQVkr1LuGMSRo3MiDiQe2OXkZXSeo6XmlG9q/oeZULNQHIsp3auUMwbtcSHZIfUI7DZNOY88Y+jtDZadW2vmOmX9SvI0f1fF10KiXcO1K7Hnuu9L9B0Tbxja1mN4jHM9HiOufEkPfcA4RASO1288Lp9GYr73zAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 14 04 26&quot;
        title=&quot;2020 03 12 14 04 26&quot;
        src=&quot;/static/a67310fb16b163e9cc3aea7c78bfc8b0/fcda8/2020-03-12-14-04-26.png&quot;
        srcset=&quot;/static/a67310fb16b163e9cc3aea7c78bfc8b0/12f09/2020-03-12-14-04-26.png 148w,
/static/a67310fb16b163e9cc3aea7c78bfc8b0/e4a3f/2020-03-12-14-04-26.png 295w,
/static/a67310fb16b163e9cc3aea7c78bfc8b0/fcda8/2020-03-12-14-04-26.png 590w,
/static/a67310fb16b163e9cc3aea7c78bfc8b0/41d3b/2020-03-12-14-04-26.png 774w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/67b3e455d99c8110313a6ea2e5826264/748f4/2020-03-12-14-05-12.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 5.405405405405405%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAABCAYAAADeko4lAAAACXBIWXMAAAsTAAALEwEAmpwYAAAATElEQVQI1y3I4QpAMBRAYQ8zpdTukqlhG4sik/d/mmPFr9N3KlENu9IcSgi1xjkhLYZp1AQvrNHgZ/lcuqWO+P8nW+7LFhvy2TPYlhcSPCEq6lNFjAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 14 05 12&quot;
        title=&quot;2020 03 12 14 05 12&quot;
        src=&quot;/static/67b3e455d99c8110313a6ea2e5826264/fcda8/2020-03-12-14-05-12.png&quot;
        srcset=&quot;/static/67b3e455d99c8110313a6ea2e5826264/12f09/2020-03-12-14-05-12.png 148w,
/static/67b3e455d99c8110313a6ea2e5826264/e4a3f/2020-03-12-14-05-12.png 295w,
/static/67b3e455d99c8110313a6ea2e5826264/fcda8/2020-03-12-14-05-12.png 590w,
/static/67b3e455d99c8110313a6ea2e5826264/748f4/2020-03-12-14-05-12.png 656w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;response should always have a statusCode and a body.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/a7519a94a5908f513899302f06d78fe7/47aef/2020-03-12-14-06-51.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 67.56756756756756%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAABqklEQVQ4y41T2Y7bMAz0r8S27sOW5ENJnAabLRboPmz//2umtBMUteFN+jCQLYFDcoYsbDvAqxYqJPjUoes9+qGFcQ5KKxhr7jAKSgloJZdTLaeE1vLxJsE5Q2HjgM5d0KoIe6ggmgQRO+hhgKIEC1p68x6srlER6icopusN19M7xjQg54wQAqI7IdgzGpspq0JZVairewBj7CkKR+0476gtDakYrDGw1sNI8QCDU5zeFJHzFened3E8ZpzPJ3SkW4gWfYoYh4i+kchBIziFaEkzoyGEeE04jqRhH9AmhSO17L0lAg6nBYLhUNahZhzV3PYjaHuuCJ2QuL2/IU9nKHI2hJac0yuhGftHu1cVGrL94+eIyzQgBqp2mqjSFrG1aBqNFA3dG/Td/O9fV6hIF3Ng4PNIlCXKQ7kK2MPTChk5V/H7pZTkphTfEmyDdwktDe719oHbj184pQs86cgowezojO2o7BGvCHMe8PvrE+lyRSC340h6jREdJcp5JNf94vB/EzaJBjvVsNrTntq/2zKTbEdlW+m+KbTUy1hQa4zmbV5wxr+v5BXhH1fTnkHX9F3TAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 12 14 06 51&quot;
        title=&quot;2020 03 12 14 06 51&quot;
        src=&quot;/static/a7519a94a5908f513899302f06d78fe7/fcda8/2020-03-12-14-06-51.png&quot;
        srcset=&quot;/static/a7519a94a5908f513899302f06d78fe7/12f09/2020-03-12-14-06-51.png 148w,
/static/a7519a94a5908f513899302f06d78fe7/e4a3f/2020-03-12-14-06-51.png 295w,
/static/a7519a94a5908f513899302f06d78fe7/fcda8/2020-03-12-14-06-51.png 590w,
/static/a7519a94a5908f513899302f06d78fe7/efc66/2020-03-12-14-06-51.png 885w,
/static/a7519a94a5908f513899302f06d78fe7/47aef/2020-03-12-14-06-51.png 1063w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt; Personal investigation : creating a full stack app&lt;/h2&gt;
&lt;p&gt;If you want to build an app that can leverage that rest API that is written in Lambda, you can use aws-amplify : &lt;a href=&quot;https://aws-amplify.github.io/docs/js/api&quot;&gt;https://aws-amplify.github.io/docs/js/api&lt;/a&gt;.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Formation AWS 09-10/03/2020]]></title><description><![CDATA[AWS Essentials https://learning.oreilly.com/videos/amazon-web-services/9780134702186/9780134702186-awsa_01_01  1.1 Cloud Computing On-demand…]]></description><link>http://nans-dumortier.com/aws-training/</link><guid isPermaLink="false">http://nans-dumortier.com/aws-training/</guid><pubDate>Tue, 10 Mar 2020 15:15:00 GMT</pubDate><content:encoded>&lt;h2&gt;AWS Essentials&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://learning.oreilly.com/videos/amazon-web-services/9780134702186/9780134702186-awsa_01_01&quot;&gt;https://learning.oreilly.com/videos/amazon-web-services/9780134702186/9780134702186-awsa_01_01&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt; 1.1 Cloud Computing&lt;/h3&gt;
&lt;p&gt;On-demand
Resource pooling (shared servers, shared buildings)
Rapid Elasticity =&gt; growing when we need to grow
Measured service =&gt; Pay as you go&lt;/p&gt;
&lt;h3&gt; 1.2 Regions&lt;/h3&gt;
&lt;p&gt;Primary building block.
VM, Storage, … You pick a region.
Cost in AWS is determined by the region.
You can choose multiple regions (for multiple audiences), or also to spread risk&lt;/p&gt;
&lt;h3&gt;1.3 Availability zones&lt;/h3&gt;
&lt;p&gt;Availability zones are a collection of datacenters. Connected with private fiber.
us-west-2a us-west-2b us-west-2c …
They are key to fault tolerance.
System that’s resilient on the machine, but also resilient on the datacenter.
What happens when a datacenter becomes unreachable.&lt;/p&gt;
&lt;h3&gt; 1.4 Edge locations&lt;/h3&gt;
&lt;p&gt;Edge location
Caching
Amazon route 53 =&gt; DNS query as quickly as possible.
Edge location serve Amazon CloudFront and they serve Amazon route 53&lt;/p&gt;
&lt;h3&gt;1.5 Scope of services&lt;/h3&gt;
&lt;h4&gt;Global&lt;/h4&gt;
&lt;p&gt;AWS IAM
AWS CloudFront
AWS Route53&lt;/p&gt;
&lt;h4&gt; Regional&lt;/h4&gt;
&lt;p&gt;Dynamo DB …&lt;/p&gt;
&lt;h4&gt; Availability&lt;/h4&gt;
&lt;p&gt;Elastic block store
Elastic compute cloud&lt;/p&gt;
&lt;h3&gt; 1.6 Service overview&lt;/h3&gt;
&lt;p&gt;AWS console.
top right =&gt; choose region.&lt;/p&gt;
&lt;p&gt;Compute, Storage, Database, Networking, Analytics, Security, Management Tools, Developer tools, Internet of Things, Game development, Mobile services, …
Rich environment.&lt;/p&gt;
&lt;h2&gt; 2. Security in AWS&lt;/h2&gt;
&lt;h3&gt; 2.1 AWS Identity and Access Management&lt;/h3&gt;
&lt;p&gt;AWS IAM
Authent Autho Users Group, Password Policy, Multi factor authentication =&gt; Smth you know combined with smth you have (phone (have), user/password (know))
Authenticating and Authorizing against AWS API.&lt;/p&gt;
&lt;h3&gt;Creating a user and group&lt;/h3&gt;
&lt;h4&gt; Create a User&lt;/h4&gt;
&lt;p&gt;autogenerate a password AND require to create a new password at next sign in
give the password to the person over an encrypted connection of some kind.&lt;/p&gt;
&lt;h4&gt;Create a group&lt;/h4&gt;
&lt;p&gt;Create a group, create permissions, and add user to the group&lt;/p&gt;
&lt;h3&gt;2.3 access keys&lt;/h3&gt;
&lt;p&gt;jane.doe
password.
She wants sdk, CLI, … Create Access Key for Jane.doe.
Access ID, Secret Accesss key.&lt;/p&gt;
&lt;h3&gt; Permissions and Policies&lt;/h3&gt;
&lt;p&gt;Permissions are granted via policies
Policies are written in JSON&lt;/p&gt;
&lt;p&gt;We can genetare policies thanks to a tool created by Amazon.&lt;/p&gt;
&lt;p&gt;All policies start with a default implicit deny.&lt;/p&gt;
&lt;p&gt;We need an explicit allow to have permissions.
Amazon Resource Name :
Fromat pattern to find in the docs.
arn:aws:iam:…:user/jdoe
arn:aws:s3:
arn:aws:
smth can be let blank :::::&lt;/p&gt;
&lt;p&gt;implicit deny =&gt; explicit deny =&gt; explicit allow&lt;/p&gt;
&lt;p&gt;Statements specify :
Principal (resource based policies)
Actions&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ex2:RunInstanced
Resources&lt;/li&gt;
&lt;li&gt;EC2 instances
Conditions&lt;/li&gt;
&lt;li&gt;time of day&lt;/li&gt;
&lt;li&gt;from specific IP address&lt;/li&gt;
&lt;li&gt;resource contains particular tag&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;2.5 Creating and attaching policies&lt;/h3&gt;
&lt;p&gt;Generator creates the appropriate syntax.
Allow
EC2
RunIntances, … (actions that are authorized).
ARN : * (all)&lt;/p&gt;
&lt;p&gt;And then you can attach a policy to a group.
Developers =&gt; run EC2 instances.&lt;/p&gt;
&lt;h3&gt;2.6 Understanding Roles&lt;/h3&gt;
&lt;p&gt;Rotate credentials regularly.
Credentials should never be shared, in the code or in environment variables
Roles enable us to use temporary credentials that are cached by the cli or the sdk.
high level of security&lt;/p&gt;
&lt;h3&gt;2.7 Creating roles&lt;/h3&gt;
&lt;p&gt;IAM =&gt; Role section
create new role
Role Name =&gt; Name of application. myApplication
Role type (S3 stuff)
attach policy&lt;/p&gt;
&lt;p&gt;every application will be able to read from S3&lt;/p&gt;
&lt;h3&gt;2.8 Federated Users&lt;/h3&gt;
&lt;p&gt;We can create Single Sign on
LDAP, Active directory.&lt;/p&gt;
&lt;p&gt;We can federate applications so that they can all use the same S3 bucket.
This way we can bypass backend APIs. Allow mobile apps to access directly s3 services.&lt;/p&gt;
&lt;p&gt;User authenticate against our app
Identity broker will make a acall to aws security token service.
The service will return temporary credentials.&lt;/p&gt;
&lt;p&gt;C’est pour gérer les devs je crois (?)&lt;/p&gt;
&lt;h3&gt;2.9 managing an MFA device&lt;/h3&gt;
&lt;p&gt;Multi factor authentication
Hardware MFA device (to be ordered from Amazon :o )
Virtual MFA device
QR code or show secret key.
Scan.
Add authentication code
wait
add second authentication code&lt;/p&gt;
&lt;p&gt;have jane come over to my desk.&lt;/p&gt;
&lt;p&gt;in case you can’t call jane to you desk&lt;/p&gt;
&lt;h3&gt;2.10 Resource Policies&lt;/h3&gt;
&lt;p&gt;Apply permission to aws permissions.
policies that are not applied to users or group, but to resources.
Make an s3 bucket publicly readable for example.&lt;/p&gt;
&lt;h3&gt;2.11 Applying resource policy&lt;/h3&gt;
&lt;p&gt;S3 service
add bucket policy
click policy generator
allow
getObject, listObjects …
arn:aws:s3:::nameofthebucket/*&lt;/p&gt;
&lt;p&gt;add statement&lt;/p&gt;
&lt;h3&gt;2.12 Using roles for cross account access&lt;/h3&gt;
&lt;p&gt;Payer Account (initial account)
(pays the bill)&lt;/p&gt;
&lt;p&gt;Development account - Production Account&lt;/p&gt;
&lt;p&gt;you can &lt;strong&gt;leverage&lt;/strong&gt; roles.
You can allow a user in one account to access ressources from another account.&lt;/p&gt;
&lt;h3&gt;2.13 Best Practices&lt;/h3&gt;
&lt;p&gt;Leverage groups : give only ENOUGH rights. Not more.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grant least privilege&lt;/li&gt;
&lt;li&gt;Strong pwd policy&lt;/li&gt;
&lt;li&gt;deny statements for added security&lt;/li&gt;
&lt;li&gt;never share credentials&lt;/li&gt;
&lt;li&gt;multiple accounts for isolation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;master account&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;protect it&lt;/li&gt;
&lt;li&gt;don’t use for day-to-day&lt;/li&gt;
&lt;li&gt;delete default access keys&lt;/li&gt;
&lt;li&gt;Enable MFA with physical key, and lock in a safe.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Networking AWS&lt;/h2&gt;
&lt;p&gt;Amazon virtual private cloud : VPC
Segment networks
Create a VPC in a particular region.
Choose a particular address range
We can create subnets.&lt;/p&gt;
&lt;h3&gt;3.2 Creating a VPC&lt;/h3&gt;
&lt;p&gt;from the aws console
VPCs are specific to a region
We have a default VPC from Amazon.
10.2.0.0 =&gt; the widest range of ip addresses&lt;/p&gt;
&lt;p&gt;a vpc has a route table
ACL =&gt; Allow incoming or outcoming traffic&lt;/p&gt;
&lt;h3&gt;3.3 adding subnets&lt;/h3&gt;
&lt;p&gt;Create a subnet below a VPC, and specify an availability zone
We can assign a CIDR block (I really have to learn more about CIDR ranges !!)
/24 =&gt; allows 256 IP addresses. The 1st 4, and the last one IP address are not usable (used by AWS)&lt;/p&gt;
&lt;h3&gt;3.4 Routing&lt;/h3&gt;
&lt;p&gt;ELB =&gt; load balancer
EC2 application server
Database
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/275b2fefcad7fa110ba25e3198645234/f6f78/2020-03-09-14-16-16.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 58.10810810810811%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACU0lEQVQoz51SS08UQRicX+rBeOSiCcSQCMsNT/4EE/HAdTXxEYMJEjEQmGXBKEqAxWFnd7vn3dPTPTO7U9aORgyJFzupdOd7VNf3cLrdLjY2nqPbfYHj4xO4vR76R0c4+gd6PYK36/awv3fQ2vr9fgvXdeGUZYm6NJjVFv99ZjdPZ9o0GCUlvNDCCzQGIkeUaVRVjbywiFUBbUokymA6nSJUFldSw48KXAwTnA1CWMZpxhXawNFFiVe7l3j5ycPbAx9bJyEmIROkIlFF1NC2/qNg/1Rgc3uAN4cjvHYFdr7EULFGLHMYEjugwiJJkRPRRPJOcPlDorQlXQ10YWBMwWDCWBRMyvMCmdJQVGXLCuNhQIWG3zVw5uWPpUScBChMCm84wtfTS8xbkWQKMhCIM0MUCEPBNmjUsxmEnCDPIhKFGHy/ajkqtsSppg3SREB6As8ev8Pe1hcGSSj2I6ZaqyJUH+/CbN9BFoXwxhGuA4WU5DufR1h66uLs3EeeBjDVb8JkTngdYPPJe5weXDBpjHM/xTeWLmRAwnswuwsIgxhXPknZ31AIfDj20dk4xHAcQrFC2xLOGgQsq7EJUEVAnbLJElOWpXWOkiWxRnDEqPII1mj2dsZeS9oy+phjY34mUNY195Dr4QvJVckx8EaQUYZxECHJNacdtfY448DStH2LKP7lY0zKgYmYAuwUfphSIQlvVrKhCK4Hh3H7zPev9d0+jFUqh019oJzMI+Gsr69jZWUFa2trLTqdTovV1dUW8/ffvtv2R8xdXrqP5cUFPFx8gJ/34mzFfZrsagAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 09 14 16 16&quot;
        title=&quot;2020 03 09 14 16 16&quot;
        src=&quot;/static/275b2fefcad7fa110ba25e3198645234/fcda8/2020-03-09-14-16-16.png&quot;
        srcset=&quot;/static/275b2fefcad7fa110ba25e3198645234/12f09/2020-03-09-14-16-16.png 148w,
/static/275b2fefcad7fa110ba25e3198645234/e4a3f/2020-03-09-14-16-16.png 295w,
/static/275b2fefcad7fa110ba25e3198645234/fcda8/2020-03-09-14-16-16.png 590w,
/static/275b2fefcad7fa110ba25e3198645234/efc66/2020-03-09-14-16-16.png 885w,
/static/275b2fefcad7fa110ba25e3198645234/f6f78/2020-03-09-14-16-16.png 932w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;
Route tables that enable to hide EC2 and database from the internet.
On premises network (what’s that ?)&lt;/p&gt;
&lt;h3&gt; 3.5 demo&lt;/h3&gt;
&lt;p&gt;Routing subnets to the internet.
vpc dashboard =&gt; route table&lt;/p&gt;
&lt;p&gt;Route tables associated
create internet gateway
attach internet gateway to vpc&lt;/p&gt;
&lt;p&gt;auto-assign public IP
=&gt; do that to enable EC2 instances&lt;/p&gt;
&lt;h3&gt;3.6 public private and hybrid subnets&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/cbe0cb32e868c84f095357533261f396/cc488/2020-03-09-14-27-41.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 50%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAACFElEQVQoz1WSW2/TQBCF++956Dt/AISE1AeKQKBeCWnVNmlVShEplDRJc7Hj267XXjtOHH+MXVBgtaPdObtzds/MbN3c3HB4sMf1VZez0zYXZ6d0Ox1arRb7e3ucnLQ5Pjps7P7nD9IkIYoiYq0wsfqzapSKSK1lCxmeWTLwcyZRQd+1JPmqhsmXJcuyEr+khrJlxWrdHFGUYIuKxaqSdY1ca4YQVnR7Lh8vp3z+6vLpNiA0Cxw3IrELsYKW4O86Uz5cOtzP0iaw/c1lpz1m/3rOmwuXwdz+JZSXY0PoB7gzB6MUg8c5zixivV6jtcF3PeZzn+nEYSm/LquKKFQoP5RVo42Vu9WGMBQSHXosFglJHHF51WvIklR85eMFkp/USK5C8qIQPCUxEXkWsxBTKkAn6YYwkqAkUrzYPuTgdQffcwjijMk8ZJVpervbeOcvhSRmOPUYO36j5NnOd56/v6PKYyKtN4RKCFMBTne/cNf5xWD0yMNU0es7zGdTuH3Fsn+M60X0x76YRxCEvD0fcXQ9prTqf8JacpZqylUsJnJEAtWa3CaUuaGSfe2vCysyLZlNZV9LrAuRUWTSSnG8Iaz1J9kCXxlUmsthIu1QEkpBjM2a17X0X32v8eMnPNBClFji1GLSf3JohH00HDIcPPA4GjEZj6UIqXxKCmOMNK9uzNqnoAZPDLoupjS0leKJDJkVvwEJVu9emYJl/AAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 09 14 27 41&quot;
        title=&quot;2020 03 09 14 27 41&quot;
        src=&quot;/static/cbe0cb32e868c84f095357533261f396/fcda8/2020-03-09-14-27-41.png&quot;
        srcset=&quot;/static/cbe0cb32e868c84f095357533261f396/12f09/2020-03-09-14-27-41.png 148w,
/static/cbe0cb32e868c84f095357533261f396/e4a3f/2020-03-09-14-27-41.png 295w,
/static/cbe0cb32e868c84f095357533261f396/fcda8/2020-03-09-14-27-41.png 590w,
/static/cbe0cb32e868c84f095357533261f396/efc66/2020-03-09-14-27-41.png 885w,
/static/cbe0cb32e868c84f095357533261f396/cc488/2020-03-09-14-27-41.png 928w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;3.7 Network Access Control Lists&lt;/h3&gt;
&lt;p&gt;tool to use within VPC that are stateless
like a firewall arround a subnet&lt;/p&gt;
&lt;h3&gt; 3.8 Security Groups&lt;/h3&gt;
&lt;p&gt;firewall that applies to an EC2 instance.
it is Stateful.&lt;/p&gt;
&lt;h3&gt;3.9 creating an NACL&lt;/h3&gt;
&lt;p&gt;web traffic acl
associated to vpc&lt;/p&gt;
&lt;p&gt;inbound =&gt;
rule #100 HTTP 80 TCP 80 0.0.0.0/0 ALLOW
rule #101 HTTPs 443 TCP 80 0.0.0.0/0 ALLOW&lt;/p&gt;
&lt;p&gt;outbound =&gt;
rule #100 TCP 1080-65535 ALLOW (send to the internet)&lt;/p&gt;
&lt;h3&gt;3.10 Creating a security group&lt;/h3&gt;
&lt;p&gt;web-server
web application security
inbound rules accept http and https from anywhere
NACL =&gt; subnet can receive traffic
Security group =&gt; Instance can receive traffic
so this is not double work&lt;/p&gt;
&lt;h3&gt;3.11 VPC peering&lt;/h3&gt;
&lt;p&gt;It is a way to pair 2 VPCs.
IP ranges must not overlap
Peering connection PCX
routing traffic from one range to another range&lt;/p&gt;
&lt;h3&gt; 3.15 Aws direct connect&lt;/h3&gt;
&lt;p&gt;dedicated private connection
1Gbps or 10 Gbps options.&lt;/p&gt;
&lt;h2&gt; 4 Computing in AWS&lt;/h2&gt;
&lt;h3&gt;4.1 EC2&lt;/h3&gt;
&lt;p&gt;Elastic compute cloud (EC2)
Virtual machine
based on Xen hypervisor
Various combinations of cpu, memory, disk, IO
one VM called an instance&lt;/p&gt;
&lt;h3&gt;4.2 AMazon Machine Image&lt;/h3&gt;
&lt;p&gt;bit for bit copy of root volume
you launch a machine from a machine image&lt;/p&gt;
&lt;h3&gt;4.3 Launching a linux instance&lt;/h3&gt;
&lt;p&gt;Amazon images
Amazon Linux
64 bits
.ebs =&gt; Elastic block&lt;/p&gt;
&lt;p&gt;t2 micro
auto assign public IP
tag instance to keep your environment organized
Name : Linux-demo
Environment : dev
Application : xxx&lt;/p&gt;
&lt;p&gt;security group !!!&lt;/p&gt;
&lt;p&gt;download a private keypair to to access the instance
public IP and private IP are associated to that instance
add security group to give shell access
go back to the instance, change security groups, add ssh security group
port 22 in ssh should be opened&lt;/p&gt;
&lt;p&gt;ssh -i azez.pem ex2-user@public.ip.of.instance&lt;/p&gt;
&lt;h3&gt;4.4 Key pairs&lt;/h3&gt;
&lt;p&gt;public and private keys.
Way of login into the operating system.
2048 ssh2 rsa keypairs&lt;/p&gt;
&lt;h3&gt;4.5 Instance metadata service&lt;/h3&gt;
&lt;p&gt;retrieve information about an EC2 instance
service within an instance to get information about itself
use this instance with scripts to bootstrap stuff.
The script gets information about the instance to configure software.&lt;/p&gt;
&lt;p&gt;169,254,169,254/latest/meta-data&lt;/p&gt;
&lt;h3&gt;4.6 Demo instance Metadata Service&lt;/h3&gt;
&lt;p&gt;curl &lt;a href=&quot;http://169.254.169.254/latest/meta-data&quot;&gt;http://169.254.169.254/latest/meta-data&lt;/a&gt;
get the instance id :
export instanceId= curl &lt;a href=&quot;http://169.254.169.254/latest/meta-data/instance-id&quot;&gt;http://169.254.169.254/latest/meta-data/instance-id&lt;/a&gt;
shell scripts that could access that variable.&lt;/p&gt;
&lt;h3&gt;4.7 bootstraping with userdata&lt;/h3&gt;
&lt;p&gt;it’s the key to maintain a self healing environment&lt;/p&gt;
&lt;h3&gt;4.8 Launching a windows instance&lt;/h3&gt;
&lt;p&gt;Meh windows&lt;/p&gt;
&lt;h3&gt;4.9 Stopping and terminating instances&lt;/h3&gt;
&lt;p&gt;Stop =&gt; can restart later
terminate =&gt; throw away&lt;/p&gt;
&lt;h3&gt;4.10 Billing options&lt;/h3&gt;
&lt;p&gt;on demand vs reserved instances
availability is not guaranteed on reserved instances&lt;/p&gt;
&lt;p&gt;reserved instance have a commitment (1 year, 1 or 3 year)&lt;/p&gt;
&lt;h3&gt;4.11 highly available web application&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/cdc4da391de74e25f0db772e9661cd3f/efc66/2020-03-09-16-25-02.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 59.45945945945946%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAAClElEQVQoz22S7WvbVhTG/cc3xEkTAvmyvDBGoC2DLoPB6IfCkhBos5LYzkhrx3HS2LEkW9LVqyXr1fr1SFtJP+zCI849V/ec53nuae3t7dHe2GB7e5udnR3W1l6wtfWSzc1N1tfX2ZCzdrvNS9nX8Xfs7u5yeHjA4cEBB4L9/f0GLd0wmEwmjMdjnqYanW6P4d2Iwe2Qfr9PfzBo9qP7e3rX/0j+ls9fvmDM5vzfatWfooJoGePYMxaBQxjYBJ7F3DIJfEdgE9aQnBv4OK6ScxNlGyhTQ9OnJFlOVVW0qtUKXS24vhnhOTY3H0b8+csF748+crx3wulxh9PfOpwdX3L2e48/fj5v8O7oE52TgdCp5N6MOM3+ZZgXJX6coc9MEt8iUgGurlCPEwbSxJ5MsafCdmzhiCVfh2Mmw6/4hrBXEWQLPGUQC8OmYJIVFCvwfJdiuaC4Oya5+ZU88tGeHqEsWGl/Efd2JY5xHRPHmrMKpqS9NqW6xXdtKZiJ5P88rJcSubkk0+FbltevJM7Rxw+UpXisn5N+/onantpn17ZYLWyy6w1W4QRPPE3l7iJdiYd1WVmO55GHJlUSU8XCVGJN04SU0zBfRgnEShgKLINq6bFYiG+JL481J5HOWZL9WNARmR5VIT+VOUUUMJ2I5Crloj9n621X0pmwE79ck7upzdqbS/wwxnh44Olex7OC54KW67AMFEUSNEhDh0eZzTyNSOIA35lTZjGmyLXtOUUWNaNVpKE8ishPSpIofy4YBAHKsjBnBjNdw1EKXST7vi/zZjIzhIE0tZWDZdtNPJ/pKCnW7V7R7fwt42PRKkV7jaIoSNOUJEka1HGR52QyXz/mcsnV+L4Pw4irizPO371GG3X5BujdbHJosQEUAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 09 16 25 02&quot;
        title=&quot;2020 03 09 16 25 02&quot;
        src=&quot;/static/cdc4da391de74e25f0db772e9661cd3f/fcda8/2020-03-09-16-25-02.png&quot;
        srcset=&quot;/static/cdc4da391de74e25f0db772e9661cd3f/12f09/2020-03-09-16-25-02.png 148w,
/static/cdc4da391de74e25f0db772e9661cd3f/e4a3f/2020-03-09-16-25-02.png 295w,
/static/cdc4da391de74e25f0db772e9661cd3f/fcda8/2020-03-09-16-25-02.png 590w,
/static/cdc4da391de74e25f0db772e9661cd3f/efc66/2020-03-09-16-25-02.png 885w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3 tier architecture in amazon ec2&lt;/p&gt;
&lt;h3&gt;4.12 =&gt; 4.14 Introduction to AWS Lambda&lt;/h3&gt;
&lt;p&gt;Mobile Application could access Amazon Simple Storage Service.
Amazon cognito =&gt; Federated user retrieves temporary credentials&lt;/p&gt;
&lt;p&gt;upload directly to S3.
Fire event to lambda function.
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/4c21fc7038f0bd21630198ed448a7f6b/6029f/2020-03-09-16-30-02.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 62.16216216216216%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACT0lEQVQoz41Ty27TQBT1pn9Av6wL1iAVlmXJArFAXRR2LEDssqnyaCs1DZEaR6QqKeqLkkLJo07UqHk1tpM4iRM/MmPncD0VoQEkGOtoPPeOz5x7fEc6OjqCLMsC6XRazMlkUrzv7u5iOx5HJpNBYmcHqVQK9XodjUYDtVoNzWYThUIBq6urWFtbQ6lUgmRbNsrlMubHFP87opEIHi8v48nKCsLhMKT19XUs3luERcQu86HqXaiqDl2jua2hY47RufiO63dvwC1LkHR0HdVqFU1SalCMUyyAORpBCoVCWFhYwMAcgZMwl3Ew5oFzHxOXiY29fBHKq5fwGROEnGaXBNjjMYzTY7T399H5lIVPa0nXNHw+PgbjHBYRMDZBq9USPrmuOyttRDmP8z/syD16iK/LD3B2f0mQSneTLinrGgN0VRUqkY6Gw1nOJzg2HTCdIniGlNOo9NreB7TkFNS0DLvdnicMRqCSc2+25qQqqEKjQzqGial/Gx8YPejtG5jWGM6d7yXTmmDrsE5EXARO9sqIvM5Ca/TFmpFfPV1Dj8gG1RyM0BJcvYLATS/w3OHIP3+G7sHHn4QuMuc3cBwG2/Mgb+Tw9mkS15ea2OB5/i+1RgOm/AKmeoWboAtIuap3UN/axKhSFu6Kkg/7Nr4NJrde0dHjPvtn/7nULg791YnjzMWlK2KOZU+QPj1H5bKEEqFcUUTXF4vF31Cgm5EXOUVRoFwqyH05Qy6bQO7gPfIX55DidKXimxvYJkSj0TuIIRb7O+b3RUUsQjcmkUjgB8vuXrNccN2mAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 09 16 30 02&quot;
        title=&quot;2020 03 09 16 30 02&quot;
        src=&quot;/static/4c21fc7038f0bd21630198ed448a7f6b/fcda8/2020-03-09-16-30-02.png&quot;
        srcset=&quot;/static/4c21fc7038f0bd21630198ed448a7f6b/12f09/2020-03-09-16-30-02.png 148w,
/static/4c21fc7038f0bd21630198ed448a7f6b/e4a3f/2020-03-09-16-30-02.png 295w,
/static/4c21fc7038f0bd21630198ed448a7f6b/fcda8/2020-03-09-16-30-02.png 590w,
/static/4c21fc7038f0bd21630198ed448a7f6b/efc66/2020-03-09-16-30-02.png 885w,
/static/4c21fc7038f0bd21630198ed448a7f6b/6029f/2020-03-09-16-30-02.png 906w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;highly available and fault tolerant
Speed time to market&lt;/p&gt;
&lt;h2&gt;5. Storage options&lt;/h2&gt;
&lt;h3&gt;5.1 overview of aws storage options&lt;/h3&gt;
&lt;p&gt;EC2 =&gt; Instance store
block storage that are built in to the EC2 instance
storage there is EPHEMERAL.
cannot take snapshots
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/368fda16749ea25265ab6ac68f393b1c/38af3/2020-03-09-16-33-07.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 61.48648648648649%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACF0lEQVQoz6VTy27aQBTl17qo1I/osovuqqhSP6KbqCtesUSloipNndQ8WlAWbVeNWEBIW0UBCRMMBoMxZvzGNqczY4zYRFl0pGP7nrlz5r6cKZfLKBTyOCkWUCqVkMvlkM1mUSwWOQRB4Fw+n4coiqjX66jVag8iY5orzOY6NH2FlbnGbDaDqk6hzecY3o8wpfZkMsF4PMY2jvHYyvCnTwBrCsTBowe2FDEVjqKIIz7gozBEJvQd+F9fgwjPQAYtvul5Pi47Ki5+KTCIx7nAcTCtSFDFM4S2tb/A6vcxEoowf3eTCGN7Af8qB1N6A3L3k5NL08GR0MHz4xZulXUiGIT4e/QKf16+wMYie8FZs4nW0ydQPn7YCTo63P4PmK0y3PFNEqG/Qa4p4+2XPlTD3R/WalVMzz/z9NJ6erS2mnRBI+0lghHdmN/fUfSwCaOkpJ4Hfa5hqS+47bouNNocg1iIDuoZBAEWyyVIkNR+u90mTVFGYwzlISdSx8FggHa7Ddt2ENJiM/um24VKO85s1hj2lil/3elQjRFvEhfUNQ233WuYhrG/SVEUyLLMnZjNxqnX63FhhmAXlUHPMN8FHbMoCpOUPZoSoaE7Fk1pNxK2bXOk48HSJoTAod1m3ymfZsVWnKb8P2u9XuP7NxHdq0s+jZlGowFJklCtVFChqFarHJUH7EOe/Wqnp59wkj3G+8I7iGen+Afj8GtJvzb2dQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 09 16 33 07&quot;
        title=&quot;2020 03 09 16 33 07&quot;
        src=&quot;/static/368fda16749ea25265ab6ac68f393b1c/fcda8/2020-03-09-16-33-07.png&quot;
        srcset=&quot;/static/368fda16749ea25265ab6ac68f393b1c/12f09/2020-03-09-16-33-07.png 148w,
/static/368fda16749ea25265ab6ac68f393b1c/e4a3f/2020-03-09-16-33-07.png 295w,
/static/368fda16749ea25265ab6ac68f393b1c/fcda8/2020-03-09-16-33-07.png 590w,
/static/368fda16749ea25265ab6ac68f393b1c/efc66/2020-03-09-16-33-07.png 885w,
/static/368fda16749ea25265ab6ac68f393b1c/38af3/2020-03-09-16-33-07.png 894w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;EBS =&gt; not resilient to the loss of a data center.
Independant
Snapshots
pay per gb per month&lt;/p&gt;
&lt;p&gt;Amazon S3
write once, read many
storage for the internet
for things that need to be retrieved from users&lt;/p&gt;
&lt;p&gt;AWS Storage gateway
virtual machine that is designed to be run on-premises
it exposes a device&lt;/p&gt;
&lt;h3&gt;5.2 Amazon simple storage service&lt;/h3&gt;
&lt;p&gt;object storage.
highly available and fault tolerant.
no filesystem
Bucket =&gt; Object
upload limit of 5 gb
objects can be multi part up to 5 TB&lt;/p&gt;
&lt;p&gt;object storage vs block storage&lt;/p&gt;
&lt;h3&gt;5.3 Demo creating buckets and object&lt;/h3&gt;
&lt;p&gt;host static website on s3 :o :o :o&lt;/p&gt;
&lt;h3&gt;5.4 Bucket Security with resource policies&lt;/h3&gt;
&lt;h3&gt;5.5 Introduction to Amazon Glacier&lt;/h3&gt;
&lt;p&gt;Write once, read rarely
glacier is cold storage
3-5 hours to get the files&lt;/p&gt;
&lt;h3&gt;5.7 Demo: Adding life cycle Rules&lt;/h3&gt;
&lt;h3&gt;5.8 Instance Store Volumes&lt;/h3&gt;
&lt;p&gt;they are build-in and ephemeral&lt;/p&gt;
&lt;h3&gt;5.9 Elastic block stock EBS&lt;/h3&gt;
&lt;p&gt;it is not a NAS
pay for provisioned storage
data is independent from instance, and is connected over network
can detach and attach to another&lt;/p&gt;
&lt;h3&gt;5.11 Creating an EBS volume in the aws dashboard&lt;/h3&gt;
&lt;p&gt;volume type (HDD, SSD)&lt;/p&gt;
&lt;h2&gt;6. Databases&lt;/h2&gt;
&lt;h3&gt;6.1 Options&lt;/h3&gt;
&lt;p&gt;Amazon RDS =&gt; for sql stuff, mariadb
Amazon ElastiCache =&gt; Memcached, redis
DynamoDB =&gt; NoSQL, Event-driven.
Redshift =&gt; Encryption&lt;/p&gt;
&lt;h3&gt; 6.2 Amazon RDS&lt;/h3&gt;
&lt;p&gt;Snapshots, backups and patches
Read replicas for when we have read heavy traffic&lt;/p&gt;
&lt;h3&gt; 6.3 Data Durability&lt;/h3&gt;
&lt;p&gt;Multi AZ deployments
Primary instance with secondary standby in a different availability zone&lt;/p&gt;
&lt;h3&gt;6.4 Launch an Amazon RDS instance&lt;/h3&gt;
&lt;p&gt;subnet group =&gt; several subnets
publicly accessible =&gt; NO&lt;/p&gt;
&lt;h3&gt;6.5 Amazon DynamoDB&lt;/h3&gt;
&lt;p&gt;NoSQL Data store
easy noSQL service
Partition vs primary key&lt;/p&gt;
&lt;h3&gt;6.7 Scan and query operations&lt;/h3&gt;
&lt;p&gt;interface pour faire des query
&lt;a href=&quot;https://learning.oreilly.com/videos/amazon-web-services/9780134702186/9780134702186-awsa_06_07&quot;&gt;https://learning.oreilly.com/videos/amazon-web-services/9780134702186/9780134702186-awsa_06_07&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;6.8 Amazon ElastiCache&lt;/h3&gt;
&lt;p&gt;Redis =&gt; in memory database, backed to disk
Memcached =&gt; in memory key-value store, not backed to disk&lt;/p&gt;
&lt;h3&gt;6.9 Amazon redshift&lt;/h3&gt;
&lt;p&gt;SQL compliant.
It is a clustered service
parallel queries across the nodes.
Ideal for OLAP and BI apps
pedabyte scale data wharehouse&lt;/p&gt;
&lt;h3&gt;6.10 database for e-commerce&lt;/h3&gt;
&lt;p&gt;Elastic load balancer =&gt; 3 EC 2 instances&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/9cb02a036f03b45f627dc133bf4580bb/e4374/2020-03-10-09-45-14.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 65.54054054054055%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAACkklEQVQ4y31TaW8SQRjen+cP8B/od7+amGhMjDbRaJpUKi1Nm9SjUumRGFODWFIvoOVYWjSUAmspu8CysGXv83FmoEea1Dd5dmaed+a9l2s2BRQLJfD8PioHv1Eq8iiVymyfy+3h548MspldFPJFFIslpt8lfDa7i0wmx84nJycMvV4PXCqVQiQSQTQaxdzcHGKxGDtTLC4tYW1tDYlEgq3r6+sMicSYu4x4PI50Og1O13VIooR2uw1ZlokXmXlrtVpQlR4ui+/7QOjjf8IFQUCWAI5twDRGCEL3XPnx1yFaXfXMHFrHpDwHh6gKHcaEYQjXdSGKIupHRxiNRuC0kYGdTzV8fl/EVjyPrRUe1f0OTNfBUrIGQVKxXe5g6kMFkqxi8WsDj1bKLAgqNKCheoq+MoDneeAs08Df/HcIhT2CDJq5DKRaBV54kcabtIA7sSJqxz00WxI6A+M8QiqqOoTjOOOUbX0AM3cXBj8Nbe8xzMIUtD+vQRN3PZdEEJLaBWTvsUe2ZVJTE2MhHNdDtz+EYVqM4wLyCSaRBJOo/JB6D+CTdBx33IRtXsSDtzzuLZewsy8xri3reL5ZxcOVCpZTh8wBRxU28SIOTBz3dSiazRS44mQr38atmTxuR/JITwyWGwpuPtnBjftf8HS1ME6ZfhpdHbGkQAouYCMrwbIsSJLEuqdpGrto2i6OBBGVagNip8u4/qmF1W9NvEvXUWurFwZJiaBbITQzgEWKR43U63UIggBFUS6i9V14rg130oCrwmpIh5W2mxbdJhfpSoedDjqNkM4Z05OyeOSuPwHlHKIbDgfQ5Tr0fhOWqYNLJpOYnZ1lv9z8/DwD3S8sLDCccdfhFXkbffkCM9PPsLmxgX9XG6XUSI7QQwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 10 09 45 14&quot;
        title=&quot;2020 03 10 09 45 14&quot;
        src=&quot;/static/9cb02a036f03b45f627dc133bf4580bb/fcda8/2020-03-10-09-45-14.png&quot;
        srcset=&quot;/static/9cb02a036f03b45f627dc133bf4580bb/12f09/2020-03-10-09-45-14.png 148w,
/static/9cb02a036f03b45f627dc133bf4580bb/e4a3f/2020-03-10-09-45-14.png 295w,
/static/9cb02a036f03b45f627dc133bf4580bb/fcda8/2020-03-10-09-45-14.png 590w,
/static/9cb02a036f03b45f627dc133bf4580bb/efc66/2020-03-10-09-45-14.png 885w,
/static/9cb02a036f03b45f627dc133bf4580bb/e4374/2020-03-10-09-45-14.png 927w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Read replica(s)
Multi-AZ =&gt; Amazon handles the primary and secondary thing&lt;/p&gt;
&lt;p&gt;ElastiCache =&gt; Category pages, related products&lt;/p&gt;
&lt;p&gt;copies to redshift in order to run BI stuff
use redshift to understand conversion rates&lt;/p&gt;
&lt;h2&gt;7 Analytics in AWS&lt;/h2&gt;
&lt;h3&gt;7.1 Real time stream processing =&gt; Amazon Kinesis&lt;/h3&gt;
&lt;p&gt;“SOAP” and old school technologies from back in the 90s.
Use case : warn users of the lifecycle of a pizza before it is delivered to them.&lt;/p&gt;
&lt;p&gt;Kinesis&lt;/p&gt;
&lt;h3&gt;7.2 Real time stream processing&lt;/h3&gt;
&lt;p&gt;It divides large amount of data into usable shards.
(terabytes per hour)&lt;/p&gt;
&lt;p&gt;1 shard =&gt; 1000 PUTs per second&lt;/p&gt;
&lt;p&gt;Kinesis stream should be handled by Apps that have ONE SINGLE PURPOSE
It can be Aggregation, Sliding Window analysis,&lt;/p&gt;
&lt;h3&gt; 7.3 Big data with amazon elastic MapReduce&lt;/h3&gt;
&lt;p&gt;yet another “amazing” service.&lt;/p&gt;
&lt;p&gt;Managed Hadoop framework (or spark, presto, hbase)
provision single or thousands of instance.&lt;/p&gt;
&lt;p&gt;for data intensive applications.
Data mining, log analysis, scientific simulation, genomics.
can read data from anywhere.&lt;/p&gt;
&lt;h3&gt;7.4 AWS Data Pipeline&lt;/h3&gt;
&lt;p&gt;Transform data from one data type to another datatype.
Helps move data between data sources.
It uses EC2 or EMR to transform Data.
Can Execute SQL queries, or custom applications.&lt;/p&gt;
&lt;h3&gt;7.5 Video Subscription Service Business Intelligence&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b1d4c58520b508eb15a24b4a45c4fba7/3fca6/2020-03-10-10-10-08.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 62.83783783783784%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAACq0lEQVQ4y22Te0/TUBjG+/n8BCYm/qUfwb/UBCHGxMRbMOBumsWBGxoYG2xGQS5jEgEl0YkOFtGMxcEu7bqua9fT/jwtqGB8kyfnvOc8fc576atMT8+QTs8ym86Qm8+TyWTJzGaZSr0glXpOJjvH3HyOwtoaq6sFisU1iSJr0l9ZWWFpaYnl5WUWFhbY3d1FCYUekUwmSSQSEk+JxWLSf8bE5ATJiQTpqSTPJxOknsaZlvtIJMLY2BjxeJx8Ph+IFwqrLEvhSqWCoqkqht6h09Ho9Uy5drAsG2HbVI7apMsHZL9WmflS5e2POo5toaoaZr/P/0zpGj22P32l0VL/HHona1k1uLNZIf7xO/c29gLx0+Z5Lq5cRXcfYRzgCCmY3axy4e47Em/2ApIQriR6mGYfP/p2u43d69HrdtE1FVPuXSGCR13XQby7yOD9Vdz6Co4zQFkq/eTaZInX27VA0HW9gGz1TfRWk66EaehoMpOmpmMYhnz0RFAMcDYuMfhwDa/1QZ57KLZlorWO6OpaEJkP32zHZWuvxXq5xWFXoO/vc7i5dZLqb56H8LOy2ri2hvwExb8YDBwZrvhD9s20BRu7KsXPTWomNF7mKA9dD2rmucdl8bMhODk2VzgofldbbRVV02R3rTOip20ga2c1m/9ECLVWj0KpzvpOXXbeQpnf+Mbl0XXir3Yk08E9Rf7bc/eM/zc6COXLnBtZ5fytRTTdQNmrNpgtltnZPwzItkzfF/hRVxlOlhiZ2mEo+YnhVIkb0m90+gFvEJTII7dV48qTbUK5siyd7LJwbExdPfX3HZtmCsILVSJvagHCiwcBLPefWoieRENuukHkyvj4ONFojEg0SiQcJnyCaDTCk9hZxB9HiMrR8+/9EQyFQjwcvc/Yg9vcuX0zmO9fSvaiFoFiNQoAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 10 10 10 08&quot;
        title=&quot;2020 03 10 10 10 08&quot;
        src=&quot;/static/b1d4c58520b508eb15a24b4a45c4fba7/fcda8/2020-03-10-10-10-08.png&quot;
        srcset=&quot;/static/b1d4c58520b508eb15a24b4a45c4fba7/12f09/2020-03-10-10-10-08.png 148w,
/static/b1d4c58520b508eb15a24b4a45c4fba7/e4a3f/2020-03-10-10-10-08.png 295w,
/static/b1d4c58520b508eb15a24b4a45c4fba7/fcda8/2020-03-10-10-10-08.png 590w,
/static/b1d4c58520b508eb15a24b4a45c4fba7/efc66/2020-03-10-10-10-08.png 885w,
/static/b1d4c58520b508eb15a24b4a45c4fba7/3fca6/2020-03-10-10-10-08.png 1112w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;8 Developer and management tools&lt;/h3&gt;
&lt;h3&gt;8.1 CloudWatch&lt;/h3&gt;
&lt;p&gt;Collect metrics on amazon stuff.
It stores metrics for up to 2 weeks
each service (EC2, ELB, EBS) will get its collection of metrics.&lt;/p&gt;
&lt;p&gt;$/metric&lt;/p&gt;
&lt;p&gt;Application-level metrics, or intance-level metrics.&lt;/p&gt;
&lt;p&gt;CPU CloudWatch Alarms.
Triggered on breach of threshold.
Alarm CPUUtilization is over 80% for 2 periods of 1 minute for example&lt;/p&gt;
&lt;p&gt;Doesn’t necessarily signal emergency.&lt;/p&gt;
&lt;p&gt;can publish notifications.
Up to 5000 alarms per account.&lt;/p&gt;
&lt;h3&gt; 8.2 CloudWatch Logs&lt;/h3&gt;
&lt;p&gt;Search using specific syntax (see docs)
Can search JSON fields
Subscription filters&lt;/p&gt;
&lt;h3&gt; 8.3 Cloudformation Infrastructure as code&lt;/h3&gt;
&lt;p&gt;Infrastructure as code
cloud formation templates
architectures are complex
Manual process =&gt; bad documentation, difficult to reproduce
Challenges with scripts =&gt; Dependencies&lt;/p&gt;
&lt;p&gt;Solution : Automate with CloudFormation&lt;/p&gt;
&lt;p&gt;Templates are meant to be written once and be deployed many times
Parameters,&lt;/p&gt;
&lt;h3&gt;8.4 Cloudformation demo&lt;/h3&gt;
&lt;p&gt;designer within cloudformation to create templates.&lt;/p&gt;
&lt;h3&gt;Application Deployment and management&lt;/h3&gt;
&lt;p&gt;AWS Elastic BeanStalk
Application management platform
easy entry
Ideal for developers.
Super convenient Beanstalk handle resources automatically&lt;/p&gt;
&lt;p&gt;AWS OpsWorks
Configuration management platform
supports chef recipes (configuration as code)
based on chef recipes
OpsWorks ideal for DevOps Engineers.&lt;/p&gt;
&lt;h3&gt;Launching an application on aws beanstalk&lt;/h3&gt;
&lt;p&gt;example&lt;/p&gt;
&lt;h2&gt;9. Mobile Application and services&lt;/h2&gt;
&lt;h3&gt;9.1 Amazon Simple Queue service&lt;/h3&gt;
&lt;p&gt;Highly Available and fault tolerant.
Seems like RabbitMQ
Buffering events to enable loose coupling and asynchronous management&lt;/p&gt;
&lt;h3&gt;9.2 Amazon Simple Notification Service SNS&lt;/h3&gt;
&lt;p&gt;publish/subscribe&lt;/p&gt;
&lt;h3&gt;9.3 Amazon simple email service SES&lt;/h3&gt;
&lt;p&gt;Sending bulk email at scale
Transactional emails, marketing emails, social networking
get feedback about those who have been bounced, those who are marked as spam …&lt;/p&gt;
&lt;h3&gt;9.4 Amazon Cognito&lt;/h3&gt;
&lt;p&gt;Identity
Integrates with major authentication providers.
Enable SSO or login with social media
Cognito can stor app data, state, preferences.
Can store in local with SQLite.&lt;/p&gt;
&lt;h3&gt;9.5 Amazon Mobile Analytics&lt;/h3&gt;
&lt;p&gt;Makes it easy to measure usage of application.
What are the going on trends?
integrate AWS mobile SDK
Also offers REST API.&lt;/p&gt;
&lt;h2&gt;10. High availability and fault tolerence&lt;/h2&gt;
&lt;h3&gt;10.1 Elastic Load Balancing&lt;/h3&gt;
&lt;p&gt;What happens when this component fails ?
Spread instances across availability zones&lt;/p&gt;
&lt;h3&gt;10.2 Listeners and SSL Certificates&lt;/h3&gt;
&lt;p&gt;Use the amazon certificate manager to have HTTPS !!
Free&lt;/p&gt;
&lt;p&gt;Upload the certificate to IAM, and then choose it for HTTPs listener&lt;/p&gt;
&lt;h3&gt;10.3 Load Balancing&lt;/h3&gt;
&lt;p&gt;Maintaining balance between availability zones&lt;/p&gt;
&lt;h3&gt;10.4 Creating an ELB&lt;/h3&gt;
&lt;p&gt;EC2 =&gt; load balancers
define vps and listeners
add security groups. The load balancer should have his own security group.
Configure Health Check
add EC2 Instances (they must be in the vpc we have chosen
)&lt;/p&gt;
&lt;h3&gt;10.5 auto scaling&lt;/h3&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/062bbbf1d4aa4fd2d1bfa3f2b855df0e/142fb/2020-03-10-14-00-34.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 61.48648648648649%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACxUlEQVQoz1WTy29TVxDG/Z92h4RE6iBcYltJnJIFXWRDFxVdsUFigwABpS1JHAIJBNvx247tmJCQQGLf57kv3+s4/JhrS5V6pO/eM4/zzZw5M4m1tTVyuRyrd+6wklthdXWV+eQ8yWSS5M9J5ubmSKVSZLNZspks6XSGhdsLZOQfy5lMZmbLzvaJfr/Pzs4uux/e87G0R6Ndp1QpUmtWKdfL5LfztDotlK8wbAM/9PAjD9u1sATKs9FNA90wUEqRQFasPGz2yT8t8vbFPtsvqxS2+nzY6LK3XuP9v5Up3v1dZm+zN9Xnn5XYfl4i/6RAp3wgAd2YisT4coJtDdGPv1J+XaHxpkV5s0kx36Gw0aYucuFVleI/NapbTfa3OpTyXfFpiG+TigT81j1CuYqr70I4ka+mD2BkCYYwNhh7Or5ENAcDAmNAaJ4TCdTgG45lEYjt0ot9TQg1Lt0BhmnNMpxcXaHrmnCd4L1M47bWMU0H7VzDHGpMohB/+3e8nT8IowhLdNqFgaWb+B8f4mz8hi9BLanff4SGoREOj/FepfHa6yjbxXMdPMdmEgZ4b+7hvhPCcMTIU7iOi60bjIoPcTfvyi0usGz1/wwj45Ro9x7hSYGRHPR9Tw7OCMeVR0T1x1N9IITBKMCXmo1bfwnpAwJzgGnbfI8JL+MaDqVGEkFuN12+PJLrODiS+WTkTR3jFSgTL4bYAqVNdbEtcixMy5wRxhkOtSGR9FSg5Bpxb1k6tnKkFPI4jkkgmOrNIUrIlNgc2UfSbqEgDqJb9uzKuq7TleZudTtUahUO2k16Ip+enXF0fELvsEejXqXZqNHpdvlyesbnL6fi35PmlyHYL9Jp1/h02Obi/CuJP+/f54aMzE8ySvMygr8KlpeXWVpaYjmG7HMykrG8uLhITuRkNsO1dJprcu566hdWsrdYWpjjduomPwA8Sj/n0XFOQAAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 10 14 00 34&quot;
        title=&quot;2020 03 10 14 00 34&quot;
        src=&quot;/static/062bbbf1d4aa4fd2d1bfa3f2b855df0e/fcda8/2020-03-10-14-00-34.png&quot;
        srcset=&quot;/static/062bbbf1d4aa4fd2d1bfa3f2b855df0e/12f09/2020-03-10-14-00-34.png 148w,
/static/062bbbf1d4aa4fd2d1bfa3f2b855df0e/e4a3f/2020-03-10-14-00-34.png 295w,
/static/062bbbf1d4aa4fd2d1bfa3f2b855df0e/fcda8/2020-03-10-14-00-34.png 590w,
/static/062bbbf1d4aa4fd2d1bfa3f2b855df0e/efc66/2020-03-10-14-00-34.png 885w,
/static/062bbbf1d4aa4fd2d1bfa3f2b855df0e/142fb/2020-03-10-14-00-34.png 907w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/44245e0c3587b30316b0d0afe7122250/65d79/2020-03-10-14-08-26.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 59.45945945945946%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsTAAALEwEAmpwYAAACcklEQVQoz31SS08TURTuz3XhwoUbZQGolHTLBoS4kRAXgm1RIJIAUWwVR1Gw9AH0Ma0d2k5nOnced57M57mdgjEhnuTLuY8533znuye1urqKhYUFLC09x+Li0hgryytjbKxvIJ/fRC6bRy6Xp7XIOWSz2Tsh7lOcc8jtDhqNC8qXkOULdLoyTG4iiXiSo9vV/yLlBxGYpeP8ZxP5FwXsr3/H/ptj7L7+iZ1XX7CzVsT64gG+7pUw0nvQDAbm+eibNq4ICrPBuAfL9WFwFynXD6BrPVi9Ppq/WmiXWjj/VsP5iYyqVIN8Wod81sbodx/cGIDZDiwvgOa46NscXkjK40S7RVykkC61ISK1Dnv3Kdx6AYHP4VLL3Dbgqw1Y758gaBZg0ncGY3CoMIyuwUiVSWpt2gviW8LhcACYCgJpBdGgTIQOXIcKyYqIKQilZcRqhQi1sUKXyNzwGo6wi9Rafjg+EznlEevIUKG12ihLMirFKkqFMkpSE6efKjj7eIKK1ELvsgNuqmAOh01qhuSbRgp1oZKIBOxgQsjYEJ1qB/svt1HclHD49hiH737gQ05CcesEB2u7qB5ViFCnB7Rhia4mHooHugnL9/96GKs1xFv3ENb34AcufDdpORw2ge37CGs7MIcadWOA+4lvI9cj78IxxHg5ARFyz0NvQK+sdqGUj6B3G9DVPgYDFf0rBaNeG1dnn2EoDah0PjJNGERkU12XWVBodHSXPCRO8YPUjdyIXj6Ixfj+G9cEP07yXZEMjEOwk8HOZDKYmprC7MwMMvPzSKfnCGmk5yaZMD9Gsp+jc4H0BKJu+vFDTD96gGez0/gD4MZdl4cMmfEAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 10 14 08 26&quot;
        title=&quot;2020 03 10 14 08 26&quot;
        src=&quot;/static/44245e0c3587b30316b0d0afe7122250/fcda8/2020-03-10-14-08-26.png&quot;
        srcset=&quot;/static/44245e0c3587b30316b0d0afe7122250/12f09/2020-03-10-14-08-26.png 148w,
/static/44245e0c3587b30316b0d0afe7122250/e4a3f/2020-03-10-14-08-26.png 295w,
/static/44245e0c3587b30316b0d0afe7122250/fcda8/2020-03-10-14-08-26.png 590w,
/static/44245e0c3587b30316b0d0afe7122250/efc66/2020-03-10-14-08-26.png 885w,
/static/44245e0c3587b30316b0d0afe7122250/65d79/2020-03-10-14-08-26.png 905w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;
self healing services&lt;/p&gt;
&lt;h3&gt; 10.6 Demand based Scaling&lt;/h3&gt;
&lt;p&gt;Scale to meet the demand.
AutoScaling groups along with Amazon CloudWatch alarms.
Scale down when CPU is low.
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/6a30db2a9a33581ce56b91bc6e7ef760/078fe/2020-03-10-14-14-43.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 62.83783783783784%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAACx0lEQVQ4y4WTXW/TWBCG80fR/gMk7vZqtTf8AJA2StKm4YIsmzQVKrCFIihCTVBLV102oaSUJP2I29SxHdtxHH/n2bGTRdztSK/meOZ49M47c3L1+ibFYolyuSy+yPraOoVCkVJp7TsKhQL5fJ78b3kqlQobG2XKG+vfkX6X1ko0Gg1y7Xabvb09Wq0W+/tNms0mHz60sliKfr/PbDbDsixM02QyMcRbOJbH1JoL3OxsmU6Wzy0WC8a6hqqOUMcjNEMnjBO8MOJ2rGIYmlw0cD2P/8zxxxyel/lnWKOjbHE4WOPSaGW53DzwGXz9xk6lyc6jFs8rLV7Xjnn1+zHPN/bZLr6n0zzBsjWiJMl+UvQT6gc/sX18l2d/3+PJ4R0OeoVlQWc+xzTGzHRpQ7MYnl0xujJQh6acLyRm45pWxjJZLBnO/SmK+pHr6yaKdsSV9heGc7Eq6IoG9gRCh3A6wZYW4yiARYJxOyKaWQIDXaRI66USpRYIWcsNsPwYNwJxuGG4LKhfX+G+/BX71X2mIro9VAiElXHZw9m6i/nuISNVJZZasdBMS2runAvTRrGm3DoyNN/H9HxyUylojm9YKJ+Ih5+Yqjc4ExmM42ANz0kujwiGbQwZXBKFxI7GwnexRSp9JnLJBhhzn1kY4wTC0A8CDHPCjSZtmTNs28WXFgKhM1JvGemSG2tMLDPtlyTwMpDES0FTv4izXCpHtja+0PWF7kj/xlD7zNg6I4x8giDCk5znB0SySpmGK6QDikOf2DWJvCmx70jtmBw/WKv3gDenv/Dy888488Eqmq5KtELM/1lOURR6vR7ngwv2j57y9uAxe4dVvnSP6Z926XVP6H3pZOh/7WYvpz8YMBCk506nzcnRG7ofdzg77ZDb3d2lWq1Sq9VobD5lq7GdIX3jtXp9hc0lavXs3o+oS/4PiT+uPuHFiz/5F8PEpnDVs/NzAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 10 14 14 43&quot;
        title=&quot;2020 03 10 14 14 43&quot;
        src=&quot;/static/6a30db2a9a33581ce56b91bc6e7ef760/fcda8/2020-03-10-14-14-43.png&quot;
        srcset=&quot;/static/6a30db2a9a33581ce56b91bc6e7ef760/12f09/2020-03-10-14-14-43.png 148w,
/static/6a30db2a9a33581ce56b91bc6e7ef760/e4a3f/2020-03-10-14-14-43.png 295w,
/static/6a30db2a9a33581ce56b91bc6e7ef760/fcda8/2020-03-10-14-14-43.png 590w,
/static/6a30db2a9a33581ce56b91bc6e7ef760/efc66/2020-03-10-14-14-43.png 885w,
/static/6a30db2a9a33581ce56b91bc6e7ef760/078fe/2020-03-10-14-14-43.png 934w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;10.7 Creating an auto scaling group&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;create a launch configuration
yum install -y httpd
to be added in create launch configuration&lt;/li&gt;
&lt;li&gt;Create auto scaling group
select the right vpc
configure scaling policies&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;11 Course Wrap up&lt;/h2&gt;
&lt;h3&gt;11.1 The ideal&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Highly available
it is up a great majority of the time
AMI, EC2, S3, Auto Scaling&lt;/li&gt;
&lt;li&gt;fault-tolerant
Aplpication continues to operate through fault
AMI (?), EC2, Elastic Load Balancing&lt;/li&gt;
&lt;li&gt;Secure
AWS CLI/Console&lt;/li&gt;
&lt;li&gt;Durable
Data survives loss of infrastructure
EBS, Snapshots, S3, Glacier&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt; 11.2 Best Practices&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Design for Failure&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Everything will fail eventually&lt;/li&gt;
&lt;li&gt;any component can fail at any time&lt;/li&gt;
&lt;li&gt;“What happens when ”____” ?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Scale Horizontally&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Stateless Applications/Components (state should not be stored locally)&lt;/li&gt;
&lt;li&gt;ElastiCache, DynamoDB&lt;/li&gt;
&lt;li&gt;Distributed processsing :&lt;/li&gt;
&lt;li&gt;parallelize and batch&lt;/li&gt;
&lt;li&gt;Kinesis, Elastic Map Reduce&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Disposable resources over fixed servers&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Automate, automate, automate !&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CloudFormation&lt;/li&gt;
&lt;li&gt;Elastic Beanstalk&lt;/li&gt;
&lt;li&gt;AutoScaling&lt;/li&gt;
&lt;li&gt;CloudWatch&lt;/li&gt;
&lt;li&gt;Third Party Tools&lt;/li&gt;
&lt;li&gt;Ansible, chef, puppet as ways to automate environment&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Security in Layers&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VPS, Routes, NACLs, Security groups&lt;/li&gt;
&lt;li&gt;IAM: Users, groups (least rights possible), roles, keys&lt;/li&gt;
&lt;li&gt;Leverage multiple accounts&lt;/li&gt;
&lt;li&gt;Protect Master credentials&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Loose Coupling&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Microservices&lt;/li&gt;
&lt;li&gt;Failures should not cascade&lt;/li&gt;
&lt;li&gt;ELB, Amazon SQS, Kinesis …&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Optimize for cost&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;11.3 The exam&lt;/h3&gt;
&lt;p&gt;80 minutes
55 questions
Architect a solution that is technically appropriate, and cost effective.
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/87e3c9a6f67e7e4c7242704035ede4b0/41be6/2020-03-10-14-41-30.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 96.62162162162163%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAYAAACQjC21AAAACXBIWXMAAAsTAAALEwEAmpwYAAAB2klEQVQ4y52UyY7CMBBE/f9fgwQnDpy4gIQEiH3f4cC+7z16LTUyEMLMRHJiO0m5qnpxuVxOotGoZDIZSSQSkkqlJJlMSqFQkFarJY1G40/DbTYbiUQikk6nFSgWi0k8HpfZbCb/uZxN7vf70wvWl8tFrternM9nfbL2B/s2v91uOtzxeJTlcilI73Q6Ui6XpVKpSL1e13W321UpvV5PBoOB2lCtVmU0Guk3+XxeJpPJg4Szyel0Upl4B0ixWJT9fq/vGJxuT9jaPnNflbMX0AawVqsps36/r2wA/XYZxsNDTj0cDgpYKpUUCHnIxw7/p08jUPJisVBf2u22etRsNnU/KGihUfYlYzgMh8OhMoT5K8OwA54kz+dzBYEhgUF+kIdhbN+iDCABITCkD9J3u52O7Xb7O4a+ZNKFgAAKIBZQluQinqLmNbKBgGT9arXSn2BHsgKKfEDZh+FXyVYyVmZ2GZNX7/z9QIZ4BzPkTafTByvWlBtrUoknfiKd9PoIyG29XmtN8qOVHhWDVMCRy5yoj8fjNw99YAUkgtYMjJWxsG6CEjzE67AUchYQPgaY7kNOkn9+i/Jrnj1raW8MOZl6RSL+wNS6L3u0NaQiGTuy2aymFnNLeh/wBzVlrJ3taGLfAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2020 03 10 14 41 30&quot;
        title=&quot;2020 03 10 14 41 30&quot;
        src=&quot;/static/87e3c9a6f67e7e4c7242704035ede4b0/fcda8/2020-03-10-14-41-30.png&quot;
        srcset=&quot;/static/87e3c9a6f67e7e4c7242704035ede4b0/12f09/2020-03-10-14-41-30.png 148w,
/static/87e3c9a6f67e7e4c7242704035ede4b0/e4a3f/2020-03-10-14-41-30.png 295w,
/static/87e3c9a6f67e7e4c7242704035ede4b0/fcda8/2020-03-10-14-41-30.png 590w,
/static/87e3c9a6f67e7e4c7242704035ede4b0/41be6/2020-03-10-14-41-30.png 638w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Beyond Asset]]></title><description><![CDATA[Beyond Asset 
(source) What is it about ? 👷‍♀️ Beyond Asset is an asset management solution that manages and optimises
the condition and…]]></description><link>http://nans-dumortier.com/beyond-asset/beyond-asset/</link><guid isPermaLink="false">http://nans-dumortier.com/beyond-asset/beyond-asset/</guid><pubDate>Tue, 30 Jul 2019 18:35:00 GMT</pubDate><content:encoded>&lt;h2&gt;Beyond Asset&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;
    &gt;
      &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 65.54054054054055%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAADcklEQVQ4y2WSfUyTRxzHjzmVVNaMLIv+4R/LHI6hZn/oBl0ob4ECIzVO4qJEmRgzQ2ZwwCasFqFEpWVkY9mW7L9lE7HWzQmWEvemmWYzc25toc9aaEH6SrsCPi3r29PnvnueisbMSz5331xyn7vf3RFCSJYAkUhz68mq7E8IWdtHstbqCFkjsHqFJx8ZH82r+wQG10ik+8mD1nAumqXU/UYKinca33h3ELtaP0P1O4N4rakfhW/pIGvSCaM2g5iLDmpRJOSigzqUHP4QFUcGkCdTXjcBBAJilyUG1UnNsC8cESLibBKpFE9TQk5RAazAP54T4oLe09rL+L9QfVKjv+sLI8nxHJdM0FtWL3UGOMqyEXrOZKU3GZYuRyPUZrHQeZ+PhoIBajX/lY5Goug9debSY0JVV4/eG1wUN+RisRiaVVqoPh1FIBhCc0c3Pv7ahJlpB9RHD+Dbs1/APeOkqo729HdGI7S6AYPoCC/9u+qh8AN1t947f1+YSCQwOzuFYNCPeDwOLhUT58HzPGg6sZLTNJmMp8V8Rts/NMFM3X+UB8ITXd36wD9LGSHHpWAx/wHD8BAWwgswfGPCpZFxfG8cw/kvP8fPP13F6IiRGi5c5AWw5829t7OzJW/n5j5T91DYo+nVhxbuCTsLB0rF8dXZPnw0oAHLLqOr+zTaj3fi6m0rDDfuQH/jT9yy3MEUY4XTOUM9Xh/GTOPIyZFOicInMiV39VyY9S+unJCjbreHLi2GKU8pHR8z0WNqDa44fPQH+yy1+e5iPsDQCDtPaeYCkLbb7aLQnCn7yviPpO39ziHG6UUikeRCwSBtbNhF+zUd1OV00N1KBW1qacekZw5+n52GzNfg/mWE+r3TlI3GIHwh3myxQCp92koqysvzFZWVr8uL5b8qlUrU1+/OICvcjp21VWjYtxcvbd6EPYeO8BdtHv53u40PmK/z7smb/Fxgmo+wUV6samJiAuvWPWUmZaWlz5bIiysKX9lR82LepqqC/M2KbVu3KKoqFQp5SVlNkUwm37h+fWfdvkaMusIwOjwI3ZtDMOJCkPVjcTmVqdnlckEiyXGIQlJeVkpkha+SF55/jghSsnVLAamuriU1tXVk44YN4q3k5b+8fbKxTfX3gZb3mPbjrUzniVamua2Vqdl/lFFrTtmOtbS4BOHwf6SZoulQXROnAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;beyond asset screenshots&quot;
        title=&quot;beyond asset screenshots&quot;
        src=&quot;/static/21ffcf61c4b2e920b14602434f05ba3a/fcda8/asset.png&quot;
        srcset=&quot;/static/21ffcf61c4b2e920b14602434f05ba3a/12f09/asset.png 148w,
/static/21ffcf61c4b2e920b14602434f05ba3a/e4a3f/asset.png 295w,
/static/21ffcf61c4b2e920b14602434f05ba3a/fcda8/asset.png 590w,
/static/21ffcf61c4b2e920b14602434f05ba3a/c67d4/asset.png 723w&quot;
        sizes=&quot;(max-width: 590px) 100vw, 590px&quot;
        style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot;
        loading=&quot;lazy&quot;
      /&gt;
    &lt;/span&gt;
(&lt;a href=&quot;https://www.sixense-group.com/en/offer/platform-solutions/beyond-asset&quot;&gt;source&lt;/a&gt;)&lt;/p&gt;
&lt;h3&gt;What is it about ? 👷‍♀️&lt;/h3&gt;
&lt;p&gt;Beyond Asset is an asset management solution that manages and optimises
the condition and maintenance of any infrastructure.&lt;/p&gt;
&lt;h3&gt;My participation in this project:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Technical dependencies management&lt;/li&gt;
&lt;li&gt;Fullstack development (Angular, Node, MongoDB)&lt;/li&gt;
&lt;li&gt;CI/CD&lt;/li&gt;
&lt;li&gt;General troubleshooting&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://www.sixense-group.com/en/offer/platform-solutions/beyond-asset&quot;&gt;More info&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Wattics]]></title><description><![CDATA[Wattics Dashboard What is it about ? ⚡ Enterprise Energy Management Software for Smart Meters, Sensors. A user friendly dashboard to monitor…]]></description><link>http://nans-dumortier.com/wattics/wattics/</link><guid isPermaLink="false">http://nans-dumortier.com/wattics/wattics/</guid><pubDate>Sun, 30 Jul 2017 18:35:00 GMT</pubDate><content:encoded>&lt;h2&gt;Wattics Dashboard&lt;/h2&gt;
&lt;p align=&quot;center&quot;&gt;
  &lt;span class=&quot;gatsby-resp-image-wrapper&quot; style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 590px; &quot;&gt;
      &lt;a class=&quot;gatsby-resp-image-link&quot; href=&quot;/static/d1837a8756e443ba69f2506fc4d3e3ca/a6d36/dashboard.png&quot; style=&quot;display: block&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;
    &lt;span class=&quot;gatsby-resp-image-background-image&quot; style=&quot;padding-bottom: 49.32432432432432%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAAsTAAALEwEAmpwYAAABt0lEQVQoz2VRy47TMBT1/7ED8Q18CGLHhmU3sABpEEICpmSQQLxaddoO0ypM0wG1ajqdNpmqedSNX3Fsx9ykg1TBkWI51z7nXJ+LBs1nZ+fDn65bFIUx2pQGVsY5hU8Iwvhum+R0RygjhIThzWm3d/7jrPX9W7vVQqt1hDHebDYK2EoDR+SS5xL+YJESFEtbQ2vDGbsafF36kzDJgps16p92ev3+ZDJVWltr2ovoi7+24G9tWbPKv9DGqJzjYIqDWe59NDhEF+5wNBrNZjOpFFx1rrdv5mnlY8p/UJurMFgu/Onqt8uzFGlVQFUIzlRpQ9cZDt8tKVTGCVtkAjbmQAXioL0jFl0LY6FTNPYuPM+7mvscpMdNp/3pbQhy7Pll8DnYVW7l7ZsrIa34LhYMwCEUlMYbytg2TXI4/PWhcXz8PrJ28OrB02YnllBTB9YwCZxlSY2KzBiRMoeuq4vjk3sPGyeJtd0Xdx6/7CTF/2QNodeAIwTTozQrZF7F5Tn3HzWc2Nr+0d0nr7up2rd9SN7T9kBZllXyqtDwNBqP5qtYWRUtOpf+ClNKqJRyP7A6vFsyE0QQ/AeeliskFY6jqwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;&gt;&lt;/span&gt;
  &lt;img class=&quot;gatsby-resp-image-image&quot; alt=&quot;dashboard with electricity consumption&quot; title=&quot;dashboard with electricity consumption&quot; src=&quot;/static/d1837a8756e443ba69f2506fc4d3e3ca/fcda8/dashboard.png&quot; srcset=&quot;/static/d1837a8756e443ba69f2506fc4d3e3ca/12f09/dashboard.png 148w,
/static/d1837a8756e443ba69f2506fc4d3e3ca/e4a3f/dashboard.png 295w,
/static/d1837a8756e443ba69f2506fc4d3e3ca/fcda8/dashboard.png 590w,
/static/d1837a8756e443ba69f2506fc4d3e3ca/a6d36/dashboard.png 650w&quot; sizes=&quot;(max-width: 590px) 100vw, 590px&quot; style=&quot;width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;&quot; loading=&quot;lazy&quot;&gt;
  &lt;/a&gt;
    &lt;/span&gt;
&lt;/p&gt;
&lt;h3&gt;What is it about ? ⚡&lt;/h3&gt;
&lt;p&gt;Enterprise Energy Management Software for Smart Meters, Sensors. A user friendly dashboard to monitor energy consumption, and extract meaningful information out of tons of data.&lt;/p&gt;
&lt;h3&gt;My participation in this project:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fullstack development (Ruby on Rails, JavaScript, React) with features such as white labeling, costs calculation, localization, …&lt;/li&gt;
&lt;li&gt;UI redesign&lt;/li&gt;
&lt;li&gt;Automatic testing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://www.wattics.com/&quot;&gt;More info&lt;/a&gt;&lt;/p&gt;</content:encoded></item></channel></rss>