{"componentChunkName":"component---src-narative-gatsby-theme-novela-templates-article-template-tsx","path":"/get-started-with-aws-ec2","result":{"data":{"allSite":{"edges":[{"node":{"siteMetadata":{"name":"Anudeep Reddy","siteUrl":"https://anudeepsblog.netlify.com"}}}]}},"pageContext":{"isCreatedByStatefulCreatePages":false,"article":{"id":"b37561fb-15a6-5ae7-9b59-c29e80b7f187","slug":"/get-started-with-aws-ec2","secret":false,"title":"Get started with AWS EC2","author":"Anudeep Reddy","date":"December 10th, 2019","dateForSEO":"2019-12-10T00:00:00.000Z","timeToRead":5,"excerpt":"Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud.","subscription":true,"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Get started with AWS EC2\",\n  \"author\": \"Anudeep Reddy\",\n  \"date\": \"2019-12-10T00:00:00.000Z\",\n  \"hero\": \"./images/hero.png\",\n  \"excerpt\": \"Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud.\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality.\\nThe AWS Cloud spans 69 Availability Zones within 22 geographic regions around the world, with announced plans for 13 more Availability Zones and four more AWS Regions in Indonesia, Italy, South Africa, and Spain.\\nOne of their services is Amazon Elastic Compute Cloud, which allows users to have at their disposal a virtual cluster of computers, available all the time, through the Internet.\"), mdx(\"p\", null, \"This Post is all about the Amazon EC2 \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"what is it?\"), \", \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Creating and accessing your own EC2 instance\")), mdx(\"h2\", {\n    \"id\": \"what-is-ec2\"\n  }, \"What is EC2?\"), mdx(\"p\", null, \"EC2 stands for \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Elastic Compute Cloud\"), \". It is a web service which allows people to run applications and workload on virtual machines in the AWS cloud.\\nBasically they are the virtual servers in the cloud which the users can access and deploy their applications to. The benefits of using Amazon EC2 include the following:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"ELASTIC WEB-SCALE COMPUTING\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"COMPLETELY CONTROLLED\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"FLEXIBLE CLOUD HOSTING SERVICES\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"INTEGRATED\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"RELIABLE\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"SECURE\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"INEXPENSIVE\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"EASY TO START\")), mdx(\"p\", null, \"Setting up a EC2 instance is pretty straight forward. You can choose an instance type and the operating systems from a wide variety of options available in the AWS console. The user is given control to setup the memory and network configuration. AWS charges users on hourly basis for EC2. The users can also assign a Elastic IP(Static IP) to their EC2 instance. If you want to setup a domain and need a DNS then \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"AWS Route 53\"), \" is at your service.\"), mdx(\"h2\", {\n    \"id\": \"creating-your-own-ec2-instance\"\n  }, \"Creating your own EC2 instance\"), mdx(\"p\", null, \"If you are here then let me assume that you have already signed up to the AWS and added a Payment option. If you are haven\\u2019t done any of that yet then go ahead and do it now.\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Sign in to your AWS console. Head over to this link to sign in \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://aws.amazon.com/\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://aws.amazon.com/\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Your console should look something like this.\")), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1920px\"\n    }\n  }), \"\\n      \", mdx(\"span\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.25%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsSAAALEgHS3X78AAACE0lEQVQozz1SiW7TQBD17/JFRFDSXKgCJEDwD6gCKnK0SZNAnNixY8d24nN9+zGzSb3S0xy7+3bmzSqdmwFe3/TReTfA3WiIr58+kh2h373FsNfDqN+Xtt/tytyAcEv+284bvCd7R3t8b9jr4tuXz1C0vYGtpuNp8YzZYoXx40JiOl/iz2wuc/92e4Le2o22h6ob2OgmWVPmt3sTz+sNFJEKxEkCx3Hg+z7iOJaxEALJ1eZFjjy/gnzeD4IAfuAjEYnMp2kK1/OgBGGIMIrguC5C8ouiQFmWqKoadX1BVVUtOHa9E+yji4Nl43w+I8tyRFSIZVkXQg74BUHIsgyFJKxawrqp0TQXv2kanIjEOfvwo6S9FxKHdzpdCLmFRHBSyAp5iaygy9JFSdUWhJfFVdm2jYJa5fMZWe6S0RLGRBiJnKqBrCJJ2ZcBVXZBc32BtXZZopju8TmqnMmYq9WQRWYNX1rg17n9NM2kza8xVxMEIWl4JIKICsnaCn3iUFg/ORSakOW41Lq4kJLQJenI2vGQ8uuwOOaHGVlG5/ICeVnJH8E/RLFsRxJ6AWmQ8mZN4gZY7gwpsk/iLzUbG8uH5yc0wBSW7UHbWzDMIw6HI039DNNyKGdCGc+W2G5VqKoK0zRgGAYe53/xa7LCdLrGj/sZXn1Y4PtPHauVTh9eo8+uSTud7zB5UvEwWeP3eIX7hwX+A7pLMhJ9PywSAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"span\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/767f925357904042451290de69979e81/f3ff0/console.webp 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/767f925357904042451290de69979e81/14dc7/console.png 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/767f925357904042451290de69979e81/14dc7/console.png\",\n    \"alt\": \"AWS Console\",\n    \"title\": \"AWS Console\",\n    \"loading\": \"lazy\"\n  })), \"\\n      \"), \"\\n    \")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now click on the services in the top navigation bar and then click on EC2 that is under compute section to navigate to the EC2 dashboard.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now in the EC2 dashboard you will see a button called \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Launch Instance\"), \" click on that to start setting up your instance.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"In the first step you will be asked to Choose an Amazon Machine Image(AMI). AMI is basically the operating system that you want to run in your EC2 instance. Few images are free to use where as there are few images for which we need to pay additional licensing fees.\")), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1920px\"\n    }\n  }), \"\\n      \", mdx(\"span\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.25%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsSAAALEgHS3X78AAACJklEQVQoz2WRC08TURCF92/6y4wklj6xEBoEKhDAWh5BQKFajWFtYSlLt/vqbrvtvtseZ+4GlLjJlzNzH7Nz5kpLuSKWciW8IaqVMjbX10grKOXzKC4vCy0VChTnRVymuJAvILf0FiuUrxaLWF2pYG2ljEqxBKmn3OL+jug94O6e6Km4VR4gdxWomgHNsIX2dUvEhuVk2K7AdEYYmA4UbShUCoIQo9EIrutgPB5jOp0iDALEUYRZmmI2mxFPOnvOU957gtY4D+ieFEwnCMMQ8/kcWMxJs03OXxb5Hz6zWCzghzHcaYQ4jiENbQuqqsLzJhj076HrGnU8hm3bGA6H1Lkrup5MJs94nifO+9TRYp6iZ3o4bOuI4gQSX3h8VOE4LmxLh2WZoggXfML3fWEnIE3Tv/ZTYkGOrHGIluIgTlJIPD/DMMQc1Yc76ANNdMTzZHhdzJXGwrCtJElE4SThGSawvQjt3jjrkNtnayO6POj3Yej6s11W0zSFRd8PEEXZnFjFD0hp8NDcCJ9+DbOCvMkdsCVFUaBpmjjMOb82203iiIizx/rnpRn+JkEE1RiJR5Lqew00Tz6jcXyGj0dn2D08Qm1zF+9qdaxuEOtbKNd2UN3cx/v6ATbqhy+obe0Te9jeOUCV7kjnX9uQZRk3NzK63S7k311cXf3Eh+NveL3dQrN5iVe5FkqNDr63O7i47uBLq4PLVqYX1zJOL37g5LyN5mkLfwCGTiFydnK85QAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"span\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/364ee74665542706d4d43ddce863a72c/f3ff0/ec2-1.webp 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/364ee74665542706d4d43ddce863a72c/14dc7/ec2-1.png 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/364ee74665542706d4d43ddce863a72c/14dc7/ec2-1.png\",\n    \"alt\": \"EC2 AMI Setup\",\n    \"title\": \"EC2 AMI Setup\",\n    \"loading\": \"lazy\"\n  })), \"\\n      \"), \"\\n    \")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"We will be choosing \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Ubuntu Server 18.04 LTS (HVM), SSD Volume Type\"), \" for this tutorial. Feel free to choose your own.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"In the next step you will be asked to choose an Instance type, Amazon EC2 provides a wide selection of instance types optimized to fit different use cases. Instances are virtual servers that can run applications. They have varying combinations of CPU, memory, storage, and networking capacity, and give you the flexibility to choose the appropriate mix of resources for your applications.\")), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1920px\"\n    }\n  }), \"\\n      \", mdx(\"span\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.25%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsSAAALEgHS3X78AAACUUlEQVQozz1Si1LaQBTNj/Z7+gltreUVAS06RUVHplbUju1Uq81YagXBAgIJ5B0S8ub07oLuzJl79j5zz0ZYyxaxlhHxdj2HzQ0R1cpHlMQN5DJZ5LNZiLkcxHwBBWZzeRQLxPN5ZNY+oES+LbpvlYrYKooUEyH0n0bo9fr4122j0+ngcSBjqGh4ktUX2xtOMBhPiU8xnmiQCRPNIJiY6ATVwFRbWsGyTMiyTFCgahrGoxE0XYdqODDsOXzfR0AIg4Bbf8XTNMVikXKbJgnxBZI4huC6LnRqZJoGbNuGZVnETZiWDdtxuI83CYMXBKshARsSLH3zucfzBMf1oBkWxvSFtuNiPFWgU0PDtGDZDpSJCoOajyguK1PolMt8qm7QJib6gyFtRiurOg13INjzBKrtoz/W4Pgp7kaPUOjLvBCYBQsOLwI0ytGdgHOXYsyy2HBCw2chLOrj+hGEJIkRhSHc2Yz0SLg+TAvGGRKmD+kU8tVCzp/9EeXNSDLmj4kzK8QUYDow3ZjAnuchiiJewO4xb55yfXw/AKnPH+D5BHOXcpePw+oERgLqzCYlq+bMUiUvSOkl2YnjCDEVRMkCPj3Ao2zj+M5Es6fBdSzo9Gc4JJVQOzrB6dfvaJx/Q/3LGQ7qJ9iuHqJY2cPmDqGyi0KlhvKnOqq1Y+zsf8b27hHWyzW8fr+Hd0WKUW6JIG5WIfz4eYtWq4W/9/fodrtoP3RwfdPEwbmEN/sSGqdXeJW5QbnRgnT7gMtfD7iSOri57eB3s4trqY2Lyz+EJs4uJPwHlVwiWkSX570AAAAASUVORK5CYII=')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"span\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/4160d2abd22e9f7f17071b92dbc31a3c/f3ff0/ec2-2.webp 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/4160d2abd22e9f7f17071b92dbc31a3c/14dc7/ec2-2.png 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/4160d2abd22e9f7f17071b92dbc31a3c/14dc7/ec2-2.png\",\n    \"alt\": \"EC2 Instance Type\",\n    \"title\": \"EC2 Instance Type\",\n    \"loading\": \"lazy\"\n  })), \"\\n      \"), \"\\n    \")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"You can now just Review the settings and Launch the instance directly or Configure other instance details, Add aditional storage and also configure the security group.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"We will just leave the other details unchanged and head over to the 6th step to configure the security group.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"This section allows you to configure the firewall rules that control the traffic to our instance.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"By Default the instance allows traffic on port 22 for establishing a SSH connection to the Server.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now let us configure it to allow http traffic on port 80.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Click on \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Add Rule\"), \" and populate the type field to HTTP and all the other fields are automatically filled.\")), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1920px\"\n    }\n  }), \"\\n      \", mdx(\"span\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.25%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsSAAALEgHS3X78AAACLklEQVQoz2VR227aQBD1F/e1v1IlCg4Y6FVKWuWhT1UjUiiUm0mBQrkYHAPGV2xsjA2czi4Bqe1KR2fOzM5lZ4VLMYcLwquUhDe5LG4/vEdeyiKdEpEWryGJIqRrERkxRZxGLpNBJp2GeHmF18TvJAlv83nKSePu4y0EZapipEwwHE8xUFQMJxo03YQ6NzCdGVCfNIzHQ0xVlftmFJsvrSMMCwvD5jBsFxN1BiHabOCtVjANA5ZpwrJM2LYN3/Ow3UaIoiM2dI8hDEOEmy0x0yHXSRLjcNjD9z0IeD6+78NxHIKL+XwOx3XPRZIkwW63w7/ncDj8pVkNgRWxbQcrmnKxWGA6ndCUFi/O7NlMg0fTGvQCXdd5zKVmR98SmqZxH8tngwi248FbR7wDm8TzVnwa1jwI1vSkgNtxnJAOEawDsmO6u6NVbPlUvr+m9cRYLg0IofuEwB4h2RiIOcxnNpBEJtfb8OhnOomsc2wf2zgkLrAjYIVgpbMdJsB+TQsJybn5H8x/ip1srtmrKBdbxEkIl3ZtOTaEutxGo9XlKP1oolCqoliuo1RpEBOIS5WjLtdkVGqtZ5bxrSLj/uE7pE8FvLz4guxdEQILdH710e395mh3+zzpgYqWq1SkXEOh3ESp1kat2Ub1hEYb9WaH2035Jx5lmfgRQrc35j/Jfss0Dbi2iXt5gquvQ9wUx2g0+3hxM8TnxgKKoqM3XKA/0s/oDWZodRTIbQW11gB/ABPlInFH1ezTAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"span\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/decc82d3dc233de6e1a3ec822036a99c/f3ff0/ec2-3.webp 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/decc82d3dc233de6e1a3ec822036a99c/14dc7/ec2-3.png 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/decc82d3dc233de6e1a3ec822036a99c/14dc7/ec2-3.png\",\n    \"alt\": \"EC2 firewall\",\n    \"title\": \"EC2 firewall\",\n    \"loading\": \"lazy\"\n  })), \"\\n      \"), \"\\n    \")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now click on \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Review and Launch\"), \" button at the bottom. Now you will see the entire configuration for your instance. If everything looks good then click on launch.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Once you click on launch you will be asked to create or use a existing Public key and Private key pair. Create a new key pair, Give the key pair a name and once you download the key click on Launch.\\nThis key will be used to authenticate us to the EC2 instance via SSH.\")), mdx(\"h2\", {\n    \"id\": \"accessing-your-ec2-instance\"\n  }, \"Accessing your EC2 Instance\"), mdx(\"p\", null, \"Once you are done with creating your EC2 instance then you will be redirected to a page where you can access all your running instances.\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Select the instance that you want to connect to, Once you have done that the connect button will be enabled. Clicking on the button will give you instructions to connect to your instance.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Open up a terminal and navigate to the location where you stored your key that you downloaded during the creation process.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"For me it\\u2019s Downloads. If you are on windows machine then fire up bash or terminal in linux and OSX.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Give your key the right permissions by typing this command: \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"sudo chmod 400 [PATH/TO/THE/KEY]\"))), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1920px\"\n    }\n  }), \"\\n      \", mdx(\"span\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.25%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsSAAALEgHS3X78AAACiUlEQVQoz33S+0uTURzH8ac2VpubWmlUP0kR5C9BBf0b/RNBRVQYZWI3JSql3Lxtc3M3d2mmm6BDhLTCfgmW98s23Zo6p5VTiYL68d3Xx37oh+qBF885h+d8+H7Pc5QGi537ZjdVthj3nDFqnYNY+sfwvk3hGkngeZ3ELTqH52W+6+PqJ4aHhrCYW3DYHTicLtqtNsLhbpR6i5sLF2s4UnmeQyfPYao4TcnxM5SeOIvu6CnVnrITKuVABfuOVZLOrfPufZxHTTaabB6eNHdQ/6yNts4ulBeRfm5W12Ay7KPUqKekaD/FMjbpdRh/2xnvrBl0GsoPllLY2CA+MY3Z6sLhC9HhCdLm9BHojqL4XvZz484D9AYDRqNRmP7KZDKh1xsoKy+nUNjkw+SsVOfFFewVEWzeMMHefpRQJMat2ro/Av9uN1CvBm5tbzMxPY/VHcQbjuJ5EZHQHsLRAWk5GuP23ToMhiJ1078UFxfLNwbKDx9mc2tLAuewSau+cARvqBeP6O6LoXR193G1qhqNRotOp1NptFr2ajQqjUqLVtYURaFIql1dzTM2NYvVFVCD3FKdzR3AL+GKXw7SYnVw+fpNrohL16pobm0nGAzh8fro8gd2BXaE6Aq+5Nv3H3KGM3R4ZS4t+6Uor7QdjsoZNrZ08Fz+ltnuobHVyWOzneVcnv89U/mfDI6M8vCpmYZmu+pxkxWby48yPjVHajEtMixmsiTV9xLppRxLKzmy2WWSmZzcvS/k5EKviKyMFzIrTM6mmBITMwni4zPsZCmJhSzra2us5fNyHQp83SrwZjyL/VWKntE08fgcVb1JagZyTCfzJBZ3pdLrLGY/k8qsM5daYTaxLMFpfgHzIDALZMoVNwAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"span\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/0fa7c6d060b74d55ce4037c8cc0fb865/f3ff0/terminal.webp 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/0fa7c6d060b74d55ce4037c8cc0fb865/14dc7/terminal.png 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/0fa7c6d060b74d55ce4037c8cc0fb865/14dc7/terminal.png\",\n    \"alt\": \"Terminal\",\n    \"title\": \"Terminal\",\n    \"loading\": \"lazy\"\n  })), \"\\n      \"), \"\\n    \")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Once you are done doing that Copy down the example command shown in the EC2 dashboard and run it in your terminal.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"That\\u2019s it you are now connected.\")), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1920px\"\n    }\n  }), \"\\n      \", mdx(\"span\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.25%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsSAAALEgHS3X78AAACr0lEQVQoz32S60uTYRiH3/AwnG413ZzO4aQIjPpb+if6Vn0oaihJR+lEORXdqXZwc3Mrp6RBQlpQX6LF1HnadDZ1TStXUgT18erea9S3Xri4n/flfq739xyUO71uLjsCnHNO0OmZwO5+Ss/4W/wvMzycXsY3s4z/xb9xmfcfPjI9NYXD0Y/X7cX7wMeg00UsFke53ufn5KkO9LYTaCzt1FiPq1Q3t1PZeJQDDYdRhAPGIyiGNuk5Rm5rh9dvknT3uOhxBbjV5+H6vQEGHoZQRhITXOy8hMVspLmxgVaLmTZrM6b6g+i0mr/oBW11hXw/RGl3l+RsGofTh3coiicQYeDBEMPxMZRg/AkXum5ga2ujqakZg6FerUajiUMGAzqdnrq6OrXW1GgxmkyUSl94N7co6YL4IqNCAlcwRmR0AiWSmKTjSrfaaDabRWigtrZWBDqVsmxfqBNhjdq3t7fHbHoZpz9CMDZGYCQh0sfExiZRoiLsunaLlpYWrFYrra2t2Gw2LBaLJG1Cr9ersnLVarWYGhvZLZVEuIRLljoUSxCMjhIQ4uNPUULyh3MdXTSYjNQ31KvLLE/UaDRqoqqqKioqKqisrERRFDVtZjXH21RaEg6rIr+kc8k4LHIlLBvZK0d/2n6Rs3Y7Z87b6RtwEomOEBwKEQoP7zNcJkoo8ojvP37KHi7gCcq7BArHxwnKsmNjsod3+z3cH/TJiQW42+/lpsPFRqHI/5508RfPZl5x9baDO31ulZs9Tly+MEpqfons2rrK2nr+T90kt1FgY6tAPr9JZr1ArvCZglzoLSEv41XpmVvMMi/MLmRIphZIzS+jrKzm2dneZrtYlOtQ4tvXEi9TedzPszx+lSOZXOL8aIbOyQLpTJGVtX2yuR3W8p/Iru+wlN1icWVTxDl+A6myMxwHtF5sAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"span\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/e540127ad60c6502d190e1fdca1e5187/f3ff0/terminal1.webp 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/e540127ad60c6502d190e1fdca1e5187/14dc7/terminal1.png 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/e540127ad60c6502d190e1fdca1e5187/14dc7/terminal1.png\",\n    \"alt\": \"Terminal-connected\",\n    \"title\": \"Terminal-connected\",\n    \"loading\": \"lazy\"\n  })), \"\\n      \"), \"\\n    \")), mdx(\"h2\", {\n    \"id\": \"setting-up-a-apache-webserver\"\n  }, \"Setting up a apache webserver\"), mdx(\"p\", null, \"As you are connected to the machine via SSH, You now have a terminal access to the virtual machine and you can run commands to perform operations on it.\"), mdx(\"p\", null, \"We have already allowed traffic on port 80, so now we can access our website if we host one on this virtual machine. To setup a simple webserver let us install apache.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"sudo apt-get update\\nsudo apt-get install apache2 -y\\n\")), mdx(\"p\", null, \"Now type the following command to start the apache server.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-bash\"\n  }), \"sudo service apache2 start\\n\")), mdx(\"p\", null, \"Now open your web browser and navigate to the IP assigned to your EC2 instance. You should be able to see the following page.\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1920px\"\n    }\n  }), \"\\n      \", mdx(\"span\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.25%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsSAAALEgHS3X78AAACFklEQVQoz2WSS2/aQBSF+bn9D/0flbppV5XaZXcNUlNCiwltCPj9GNvjJ+MHCWBsk65Or00IQV18mofmHJ175w52ZYFNnmFbCKRRhLjcYM0UPEU6qvoRIvFQZhFE6kOsOHIR4PC0w99DhT1pqmyF/UOBqhTY5gIDxQygWgStmhOCaT609x+hf/iE5GaJ4EpCKsmIf94jHE7BCTGaI58okBUGxQ5x9AixUBkGFovQQ2aWl8BYGFC+3UAdjuF8/wV2LcEeTQkJ7o8p/PEMHp3FnQrL4kctIy2LoZve2dDsDGnVbR+G68IJAnhxQsSIhIBYr5EUBdKyRELkmw0s96h70ZrupaHtxlgoNsbSHJPbBaZ/FMyXBmTVwkI2MLtTIM2WmBCq4UF/Tngy1Az3/4QmJXRsG4w5VJLZ4zgOOPcR06clSYIwjNA0DQU46c7acw+fTZkXYSUyZHmBXbVHta9RNy2a9kC0/b49HLCvG3ofEGetx1MMTsleG4osRxDFL0Z1c0l3t6vqC0PjZNgf7GNjdRofh8rYbLcoyzVqStEnahu0Tbc/0tBdl7wzfB3GD1cYGNRYTpuOIMqQipJKzuHyCDygRx711I/hp/SzxQOK8rFfy/W2T6dTGM3k9Ek0v93YyJqNkEaEc450tUJBkz/8zfDuysDnkY3bmYY3X0y8/epDNmnW7ARahxX3qGaIe8XFXHYwm5v4B5PwFyTcT2DBAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"picture\", {\n    parentName: \"span\"\n  }, \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/04b25b060e9ad5257b0c7449d45d5bf3/f3ff0/apache.webp 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/webp\"\n  })), \"\\n        \", mdx(\"source\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"srcSet\": [\"/static/04b25b060e9ad5257b0c7449d45d5bf3/14dc7/apache.png 1920w\"],\n    \"sizes\": \"(max-width: 1920px) 100vw, 1920px\",\n    \"type\": \"image/png\"\n  })), \"\\n        \", mdx(\"img\", _extends({\n    parentName: \"picture\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/04b25b060e9ad5257b0c7449d45d5bf3/14dc7/apache.png\",\n    \"alt\": \"Apache home page\",\n    \"title\": \"Apache home page\",\n    \"loading\": \"lazy\"\n  })), \"\\n      \"), \"\\n    \")), mdx(\"p\", null, \"We have successfully installed apache now.\\nIf you want to host your own website then modify the files located at \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/var/www/html\"), \". That directory contains the files of your website.\"), mdx(\"h2\", {\n    \"id\": \"assigning-an-elastic-ip\"\n  }, \"Assigning an Elastic IP\"), mdx(\"p\", null, \"The IP address that is currently assigned to the Instance will be lost if you reboot the instance. So if you want your instance to have a static IP then AWS offers something called Elastic IP. You can assign a static IP to the instance using Elastic IP.\"), mdx(\"p\", null, \"Follow these steps to assign a Elastic IP:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"In the sidebar of the EC2 instance dashboard you will find Elastic IP under \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Network and security\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Click on allocate elastic IP. \"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Once that\\u2019s done. Select the IP and click on actions and click on \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Associate Elastic IP address\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"In the next page select the Instance to which you want to assign that IP to.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Click on Associate and you are done. The Elastic IP is associated to your instance.\")), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"NOTE: The Elastic IP is a chargable service.\"), \"\\n\", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Check out the pricing in the AWS pricing page\")), mdx(\"h2\", {\n    \"id\": \"final-thoughts\"\n  }, \"Final Thoughts\"), mdx(\"p\", null, \"AWS EC2 is an easy way to get started with cloud computing as a beginner. AWS also provides one year free tier services if you setup your payment information. With the AWS free tier you can access all the basic services provided as a part of AWS for free. Claim your free one year now by signing up and providing your payment info.\\nNavigate to this page to know more \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc\")), mdx(\"p\", null, \"Thank you!\"), mdx(\"h3\", {\n    \"id\": \"feel-free-to-leave-your-comments-below\"\n  }, \"Feel free to leave your comments below\"));\n}\n;\nMDXContent.isMDXComponent = true;","hero":{"full":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAACE4AAAhOAFFljFgAAABWElEQVQoz21SYU/CMBDl//8Fvxjxg8YIRhONZgk6NBEd6ggGgoNNxxwMkTADZlnb55WuhDkuuVyvvXt9fb2SEALSpfEsauOcr9f5kw3711Nag2XN09kP7I6HNGWrnDFG65QKUuqlPUF16VI5S1SugclLm2BhNMNexUSzPUC5asLxwhW3RULFXhXi4wIYVID+EdArU8NdBsaLDJe/CXYODLQ6A8zjGG8Etn9Sp9xVPbMuRHANjAhkaACTZ2B8D8z7eYaMKfRTw4LrRwh9B2bNwGLq0fNjHJ7dKkmmbYj3c8C/JLZnwKdJDOsqapYSkHPFsOMMUb2yYNs2Wg0D1uMDdo9v4LgBmCyZPEGMGwpAMgxqxY/RGupnB6Mp7K6PVi9cRflB0pKUbo9diKgJfL0AkQV8vxbAchoKsX0w1CiJ7WOT6ZbTcHMOZZQSaNdnCpNT5JlWvDAu2v4Al4ux+nKEC8oAAAAASUVORK5CYII=","aspectRatio":2.30188679245283,"src":"/static/929bbbd3719bbaf18496106689034c20/f4f8c/hero.png","srcSet":"/static/929bbbd3719bbaf18496106689034c20/206f6/hero.png 236w,\n/static/929bbbd3719bbaf18496106689034c20/84032/hero.png 472w,\n/static/929bbbd3719bbaf18496106689034c20/f4f8c/hero.png 944w,\n/static/929bbbd3719bbaf18496106689034c20/513fc/hero.png 1416w,\n/static/929bbbd3719bbaf18496106689034c20/61f30/hero.png 1830w","srcWebp":"/static/929bbbd3719bbaf18496106689034c20/99fbb/hero.webp","srcSetWebp":"/static/929bbbd3719bbaf18496106689034c20/77392/hero.webp 236w,\n/static/929bbbd3719bbaf18496106689034c20/1f177/hero.webp 472w,\n/static/929bbbd3719bbaf18496106689034c20/99fbb/hero.webp 944w,\n/static/929bbbd3719bbaf18496106689034c20/4a492/hero.webp 1416w,\n/static/929bbbd3719bbaf18496106689034c20/d0ace/hero.webp 1830w","sizes":"(max-width: 944px) 100vw, 944px"},"regular":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAACE4AAAhOAFFljFgAAABWElEQVQoz21SYU/CMBDl//8Fvxjxg8YIRhONZgk6NBEd6ggGgoNNxxwMkTADZlnb55WuhDkuuVyvvXt9fb2SEALSpfEsauOcr9f5kw3711Nag2XN09kP7I6HNGWrnDFG65QKUuqlPUF16VI5S1SugclLm2BhNMNexUSzPUC5asLxwhW3RULFXhXi4wIYVID+EdArU8NdBsaLDJe/CXYODLQ6A8zjGG8Etn9Sp9xVPbMuRHANjAhkaACTZ2B8D8z7eYaMKfRTw4LrRwh9B2bNwGLq0fNjHJ7dKkmmbYj3c8C/JLZnwKdJDOsqapYSkHPFsOMMUb2yYNs2Wg0D1uMDdo9v4LgBmCyZPEGMGwpAMgxqxY/RGupnB6Mp7K6PVi9cRflB0pKUbo9diKgJfL0AkQV8vxbAchoKsX0w1CiJ7WOT6ZbTcHMOZZQSaNdnCpNT5JlWvDAu2v4Al4ux+nKEC8oAAAAASUVORK5CYII=","aspectRatio":2.30188679245283,"src":"/static/929bbbd3719bbaf18496106689034c20/3e3e7/hero.png","srcSet":"/static/929bbbd3719bbaf18496106689034c20/a123b/hero.png 163w,\n/static/929bbbd3719bbaf18496106689034c20/b6f5d/hero.png 327w,\n/static/929bbbd3719bbaf18496106689034c20/3e3e7/hero.png 653w,\n/static/929bbbd3719bbaf18496106689034c20/de899/hero.png 980w,\n/static/929bbbd3719bbaf18496106689034c20/00f25/hero.png 1306w,\n/static/929bbbd3719bbaf18496106689034c20/61f30/hero.png 1830w","srcWebp":"/static/929bbbd3719bbaf18496106689034c20/0acdf/hero.webp","srcSetWebp":"/static/929bbbd3719bbaf18496106689034c20/ac59e/hero.webp 163w,\n/static/929bbbd3719bbaf18496106689034c20/7660b/hero.webp 327w,\n/static/929bbbd3719bbaf18496106689034c20/0acdf/hero.webp 653w,\n/static/929bbbd3719bbaf18496106689034c20/75470/hero.webp 980w,\n/static/929bbbd3719bbaf18496106689034c20/68d47/hero.webp 1306w,\n/static/929bbbd3719bbaf18496106689034c20/d0ace/hero.webp 1830w","sizes":"(max-width: 653px) 100vw, 653px"},"narrow":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAACE4AAAhOAFFljFgAAABWElEQVQoz21SYU/CMBDl//8Fvxjxg8YIRhONZgk6NBEd6ggGgoNNxxwMkTADZlnb55WuhDkuuVyvvXt9fb2SEALSpfEsauOcr9f5kw3711Nag2XN09kP7I6HNGWrnDFG65QKUuqlPUF16VI5S1SugclLm2BhNMNexUSzPUC5asLxwhW3RULFXhXi4wIYVID+EdArU8NdBsaLDJe/CXYODLQ6A8zjGG8Etn9Sp9xVPbMuRHANjAhkaACTZ2B8D8z7eYaMKfRTw4LrRwh9B2bNwGLq0fNjHJ7dKkmmbYj3c8C/JLZnwKdJDOsqapYSkHPFsOMMUb2yYNs2Wg0D1uMDdo9v4LgBmCyZPEGMGwpAMgxqxY/RGupnB6Mp7K6PVi9cRflB0pKUbo9diKgJfL0AkQV8vxbAchoKsX0w1CiJ7WOT6ZbTcHMOZZQSaNdnCpNT5JlWvDAu2v4Al4ux+nKEC8oAAAAASUVORK5CYII=","aspectRatio":2.30188679245283,"src":"/static/929bbbd3719bbaf18496106689034c20/f156e/hero.png","srcSet":"/static/929bbbd3719bbaf18496106689034c20/f2848/hero.png 114w,\n/static/929bbbd3719bbaf18496106689034c20/42f31/hero.png 229w,\n/static/929bbbd3719bbaf18496106689034c20/f156e/hero.png 457w,\n/static/929bbbd3719bbaf18496106689034c20/cf471/hero.png 686w,\n/static/929bbbd3719bbaf18496106689034c20/3bc69/hero.png 914w,\n/static/929bbbd3719bbaf18496106689034c20/61f30/hero.png 1830w","srcWebp":"/static/929bbbd3719bbaf18496106689034c20/15384/hero.webp","srcSetWebp":"/static/929bbbd3719bbaf18496106689034c20/31fce/hero.webp 114w,\n/static/929bbbd3719bbaf18496106689034c20/e3e25/hero.webp 229w,\n/static/929bbbd3719bbaf18496106689034c20/15384/hero.webp 457w,\n/static/929bbbd3719bbaf18496106689034c20/0258d/hero.webp 686w,\n/static/929bbbd3719bbaf18496106689034c20/64ea2/hero.webp 914w,\n/static/929bbbd3719bbaf18496106689034c20/d0ace/hero.webp 1830w","sizes":"(max-width: 457px) 100vw, 457px"},"seo":{"src":"/static/929bbbd3719bbaf18496106689034c20/7ef28/hero.png"}}},"authors":[{"authorsPage":true,"bio":"I am an undergraduate student. I have been exploring the field of computer science for about 7 years now. I created this blog to\nshare my journey and things I have learnt with everyone out there.\n","id":"187d0db3-c57c-5455-ad24-678a9da5b361","name":"Anudeep Reddy","featured":true,"social":[{"url":"https://github.com/anudeepreddy"},{"url":"https://twitter.com/anudeepc85"},{"url":"https://instagram.com/anudeepc24"},{"url":"https://www.linkedin.com/in/anudeep-reddy-25332262/"}],"slug":"/authors/anudeep-reddy","avatar":{"small":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQCAwUB/8QAFwEAAwEAAAAAAAAAAAAAAAAAAQIDAP/aAAwDAQACEAMQAAABmjpopTVOGVBGVV5NlAR//8QAHBAAAgMBAAMAAAAAAAAAAAAAAAECAxEhBDFB/9oACAEBAAEFAvInKKTurOMsWrFpbYb1TkT9/Uf/xAAWEQEBAQAAAAAAAAAAAAAAAAABEBL/2gAIAQMBAT8BCaZ//8QAFxEBAAMAAAAAAAAAAAAAAAAAEAEREv/aAAgBAgEBPwGzMH//xAAdEAABBAIDAAAAAAAAAAAAAAABABARIQISIDFR/9oACAEBAAY/AgMeytppp8QsloDUeH//xAAcEAEBAAICAwAAAAAAAAAAAAABABExQVEQIWH/2gAIAQEAAT8hzj/GcM2GxdlyRglOxZh9rt8LjJDgzglDS0v/2gAMAwEAAgADAAAAEGPvwv/EABcRAQEBAQAAAAAAAAAAAAAAAAEAETH/2gAIAQMBAT8Q1NtgBN7C3//EABkRAAIDAQAAAAAAAAAAAAAAAAABESExUf/aAAgBAgEBPxBwogwrBpcP/8QAGxABAAMBAQEBAAAAAAAAAAAAAQARITFRYUH/2gAIAQEAAT8QHa673kWnQdfSWBXpehNHh9Aey2dwrDeSgAOV+QVICVSaxelz7KW54WI7+zEHcf/Z","aspectRatio":0.73,"src":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/20b9f/anudeep-reddy.jpg","srcSet":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/8de35/anudeep-reddy.jpg 13w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/efbf2/anudeep-reddy.jpg 25w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/20b9f/anudeep-reddy.jpg 50w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/900f1/anudeep-reddy.jpg 75w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/b08b0/anudeep-reddy.jpg 100w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/19128/anudeep-reddy.jpg 438w","srcWebp":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/e7b2c/anudeep-reddy.webp","srcSetWebp":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/58718/anudeep-reddy.webp 13w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/74aad/anudeep-reddy.webp 25w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/e7b2c/anudeep-reddy.webp 50w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/ed320/anudeep-reddy.webp 75w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/66016/anudeep-reddy.webp 100w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/4916f/anudeep-reddy.webp 438w","sizes":"(max-width: 50px) 100vw, 50px"},"medium":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQCAwUB/8QAFwEAAwEAAAAAAAAAAAAAAAAAAQIDAP/aAAwDAQACEAMQAAABmjpopTVOGVBGVV5NlAR//8QAHBAAAgMBAAMAAAAAAAAAAAAAAAECAxEhBDFB/9oACAEBAAEFAvInKKTurOMsWrFpbYb1TkT9/Uf/xAAWEQEBAQAAAAAAAAAAAAAAAAABEBL/2gAIAQMBAT8BCaZ//8QAFxEBAAMAAAAAAAAAAAAAAAAAEAEREv/aAAgBAgEBPwGzMH//xAAdEAABBAIDAAAAAAAAAAAAAAABABARIQISIDFR/9oACAEBAAY/AgMeytppp8QsloDUeH//xAAcEAEBAAICAwAAAAAAAAAAAAABABExQVEQIWH/2gAIAQEAAT8hzj/GcM2GxdlyRglOxZh9rt8LjJDgzglDS0v/2gAMAwEAAgADAAAAEGPvwv/EABcRAQEBAQAAAAAAAAAAAAAAAAEAETH/2gAIAQMBAT8Q1NtgBN7C3//EABkRAAIDAQAAAAAAAAAAAAAAAAABESExUf/aAAgBAgEBPxBwogwrBpcP/8QAGxABAAMBAQEBAAAAAAAAAAAAAQARITFRYUH/2gAIAQEAAT8QHa673kWnQdfSWBXpehNHh9Aey2dwrDeSgAOV+QVICVSaxelz7KW54WI7+zEHcf/Z","aspectRatio":0.73,"src":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/b08b0/anudeep-reddy.jpg","srcSet":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/efbf2/anudeep-reddy.jpg 25w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/20b9f/anudeep-reddy.jpg 50w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/b08b0/anudeep-reddy.jpg 100w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/50e4e/anudeep-reddy.jpg 150w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/471e9/anudeep-reddy.jpg 200w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/19128/anudeep-reddy.jpg 438w","srcWebp":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/66016/anudeep-reddy.webp","srcSetWebp":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/74aad/anudeep-reddy.webp 25w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/e7b2c/anudeep-reddy.webp 50w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/66016/anudeep-reddy.webp 100w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/d9b14/anudeep-reddy.webp 150w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/6b183/anudeep-reddy.webp 200w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/4916f/anudeep-reddy.webp 438w","sizes":"(max-width: 100px) 100vw, 100px"},"large":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQCAwUB/8QAFwEAAwEAAAAAAAAAAAAAAAAAAQIDAP/aAAwDAQACEAMQAAABmjpopTVOGVBGVV5NlAR//8QAHBAAAgMBAAMAAAAAAAAAAAAAAAECAxEhBDFB/9oACAEBAAEFAvInKKTurOMsWrFpbYb1TkT9/Uf/xAAWEQEBAQAAAAAAAAAAAAAAAAABEBL/2gAIAQMBAT8BCaZ//8QAFxEBAAMAAAAAAAAAAAAAAAAAEAEREv/aAAgBAgEBPwGzMH//xAAdEAABBAIDAAAAAAAAAAAAAAABABARIQISIDFR/9oACAEBAAY/AgMeytppp8QsloDUeH//xAAcEAEBAAICAwAAAAAAAAAAAAABABExQVEQIWH/2gAIAQEAAT8hzj/GcM2GxdlyRglOxZh9rt8LjJDgzglDS0v/2gAMAwEAAgADAAAAEGPvwv/EABcRAQEBAQAAAAAAAAAAAAAAAAEAETH/2gAIAQMBAT8Q1NtgBN7C3//EABkRAAIDAQAAAAAAAAAAAAAAAAABESExUf/aAAgBAgEBPxBwogwrBpcP/8QAGxABAAMBAQEBAAAAAAAAAAAAAQARITFRYUH/2gAIAQEAAT8QHa673kWnQdfSWBXpehNHh9Aey2dwrDeSgAOV+QVICVSaxelz7KW54WI7+zEHcf/Z","aspectRatio":0.73,"src":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/4b6ce/anudeep-reddy.jpg","srcSet":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/db25d/anudeep-reddy.jpg 82w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/ffb8a/anudeep-reddy.jpg 164w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/4b6ce/anudeep-reddy.jpg 328w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/19128/anudeep-reddy.jpg 438w","srcWebp":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/5a48e/anudeep-reddy.webp","srcSetWebp":"/static/10f09cd97c79e6c0d6a37e64b0ab7477/2d087/anudeep-reddy.webp 82w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/29d87/anudeep-reddy.webp 164w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/5a48e/anudeep-reddy.webp 328w,\n/static/10f09cd97c79e6c0d6a37e64b0ab7477/4916f/anudeep-reddy.webp 438w","sizes":"(max-width: 328px) 100vw, 328px"}}}],"basePath":"/","slug":"/get-started-with-aws-ec2","id":"b37561fb-15a6-5ae7-9b59-c29e80b7f187","title":"Get started with AWS EC2","mailchimp":true,"next":[{"id":"7e2c739d-9166-5f41-be73-e40d74678404","slug":"/build-a-webhook-for-google-assistant-action","secret":false,"title":"Build a Webhook for Google Assistant Action","author":"Anudeep Reddy","date":"December 8th, 2019","dateForSEO":"2019-12-08T00:00:00.000Z","timeToRead":4,"excerpt":"First of all I would like to start this section by saying, I ❤ Gitpod","subscription":true,"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Build a Webhook for Google Assistant Action\",\n  \"author\": \"Anudeep Reddy\",\n  \"date\": \"2019-12-08T00:00:00.000Z\",\n  \"hero\": \"./images/hero.png\",\n  \"excerpt\": \"First of all I would like to start this section by saying, I ❤ Gitpod\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"This post is all about how to build your webhook for your Google Assistant action and host it temporarily on Gitpod and test your code.\"), mdx(\"h2\", {\n    \"id\": \"prerequisites\"\n  }, \"Prerequisites\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Node JS\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Express JS\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Basics on how to use Github\")), mdx(\"p\", null, \"If you have these in place, Let\\u2019s get started.\"), mdx(\"h2\", {\n    \"id\": \"what-is-gitpod\"\n  }, \"What is Gitpod?\"), mdx(\"p\", null, \"First of all I would like to start this section by saying, I \\u2764 Gitpod. Gitpod is an online IDE for Github. Gitpod provides you with a fully working development environment, including a VS Code-powered IDE and a cloud-based Linux container configured specifically for the project at hand. Just prefix your Github repo URL with \\u201D\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://gitpod.io/#%22\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://gitpod.io/#\\u201D\"), \", So that the final link looks something like this \\u201D\", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://gitpod.io/#https://github.com/%5Busername%5D/%5Brepo-name%5D\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://gitpod.io/#https://github.com/[username]/[repo-name]\"), \"\\u201D or you can also use the Gitpod \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://chrome.google.com/webstore/detail/gitpod-online-ide/dodmmooeoklaejobgleioelladacbeki?hl=en\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"browser extension\"), \" to add the Gitpod button to Github page.\"), mdx(\"iframe\", {\n    width: \"560\",\n    height: \"315\",\n    src: \"https://www.youtube.com/embed/bFZMKpDV3GQ\",\n    frameBorder: \"0\",\n    allow: \"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\",\n    allowFullScreen: true\n  }), mdx(\"h2\", {\n    \"id\": \"lets-start-building\"\n  }, \"Let\\u2019s start building\"), mdx(\"p\", null, \"I have created a Github repo which will help you get started without any hassle. The repo is basically a boilerplate to get started with building your webhook. The code is written in Node JS, So it would be easier for you to build on top of it if you are already familiar with Node JS. We will be using the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://www.npmjs.com/package/actions-on-google\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"action-on-google\"), \" Node JS library (This client library makes it easy to create Actions for the Google Assistant and supports Dialogflow, Actions SDK, and Smart Home fulfillment.).\"), mdx(\"h3\", {\n    \"id\": \"create-your-action\"\n  }, \"Create your Action\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Head over to \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://console.actions.google.com/\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://console.actions.google.com/\"), \" and click on New Project.\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-2.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-28-141627.png\",\n    \"alt\": \"Annotation-2019-06-28-141627\"\n  }))), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Enter your project name and click on create project.\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-1.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/gitpod-action.png\",\n    \"alt\": \"gitpod-action\"\n  }))), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now select a category for your Action.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now under the Develop menu, give your action a name.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now head over to actions menu in Develop tab and click on \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Add your first action\"), \".\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-1.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/temp2.png\",\n    \"alt\": \"temp2\"\n  }))), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"In the next section choose \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"custom intent\"), \" and click on \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"build\"), \". Doing this will redirect you to the \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Dialogflow console\"), \" and it should look something like this.\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-3.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/temp3.png\",\n    \"alt\": \"temp3\"\n  }))), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Click on create to \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"create\"), \" your agent on Dialogflow.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Once your agent is ready, you will already have two default Intents (Default Fallback Intent and Default Welcome Intent) in place and these two do pretty good at their job.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now it\\u2019s time to create a new intent and enable fulfillments for that intent so that we can serve responses from the webhook that we will be building in the next section.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Click on create a new intent, give it a name and training phrase (training phrase will be used to invoke the intent). Now that your intent is almost ready scroll down and under fulfillments \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"enable webhook call\"), \" for the new Default welcome intent and the new intent you just created.\")), mdx(\"h3\", {\n    \"id\": \"understanding-gitpodyml\"\n  }, \"Understanding .gitpod.yml\"), mdx(\"p\", null, \"The .gitpod.yml file is used to automate setting up the environment required to run your app.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-5.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/carbon--4-.png\",\n    \"alt\": \"carbon--4-\"\n  }))), mdx(\"p\", null, \"If you want to access services running in your workspace, e.g. a development HTTP server on port 8080, you need to expose that port first. Gitpod has two means of doing that:\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"On-the-fly: when you start a process which listens on a port in your workspace, Gitpod will ask you if you want to expose that port to the internet.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"In your configuration: if you already know that you want a particular port exposed, you can configure it in the .gitpod.yml file and skip the extra click later on. For example:\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"ports:\\n  - port: 3000\\n\")), mdx(\"p\", null, \"When starting or restarting a workspace you typically want to run certain tasks. Most probably that includes the build and maybe also running tests and automatically start the application in e.g. a dev server.\"), mdx(\"p\", null, \"Gitpod allows you to configure start tasks in the .gitpod.yml file.\"), mdx(\"p\", null, \"For instance, the start script for this repository is defined as:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"tasks:\\n- init: npm install\\n  command: npm start\\n\")), mdx(\"p\", null, \"You can have multiple tasks, which are opened on separated terminals.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"tasks:\\n- init: npm install\\n  command: npm start\\n- command: echo -e \\\"\\\\n\\\\nwebhook url - $(gp url 3000)/webhook \\\\n\\\\nCopy and paste this url in the Dialogflow console\\\"\\n\")), mdx(\"h4\", {\n    \"id\": \"init-command\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"h4\"\n  }, \"init\"), \" command\"), mdx(\"p\", null, \"The init property can be used to specify shell commands that should only be executed after a workspace was freshly cloned and needs to be initialized somehow. Such tasks are usually builds or downloading dependencies. Anything you only want to do once but not when you restart a workspace or start a snapshot.\"), mdx(\"p\", null, \"In our case the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"init\"), \" command is\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"tasks:\\n- init: npm install\\n\")), mdx(\"h3\", {\n    \"id\": \"get-the-gitpod-setup-running\"\n  }, \"Get the Gitpod setup running\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Fork my \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://github.com/anudeepreddy/dialogflow-webhook-boilerplate-nodejs\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"repo (dialogflow-webhook-boilerplate-nodejs)\"), \" \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"or\"), \" just click on the run in gitpod button in my repo. (If you do this you have to fork it from the workspace so that you can commit your own changes to your repo).\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now you can just prefix your repo url with \\u201D\", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://gitpod.io/#%22\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://gitpod.io/#\\u201D\"), \". This should take you to Gitpod and start your workspace. The workspace take a little while to start.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Once the workspace is running you should see something like this.\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-2.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-25-171555.png\",\n    \"alt\": \"Annotation-2019-06-25-171555\"\n  }))), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"If you notice the Node app is already running in the first terminal. This is automated by a Gitpod configuration file. And the webhook URL is printed on to the second terminal. All the dependencies that are required are also installed while creating the workspace.\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-5.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-25-171555-crop.png\",\n    \"alt\": \"Annotation-2019-06-25-171555-crop\"\n  }))), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now that the webhook is running and i presume that you already have your agent on Dialogflow (If not create an agent), Next thing you need to do is to copy the webhook URL from the terminal and paste it in the Fulfillments section in the Dialogflow Console.\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-5.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-25-172359.png\",\n    \"alt\": \"Annotation-2019-06-25-172359\"\n  }))), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Open the index.js file which contains the code for the webhook.\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-1.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/carbon--1-.png\",\n    \"alt\": \"carbon--1-\"\n  }))), mdx(\"p\", null, \"The file initially contains this code. Now lets add some more code to it to display a card when we invoke the new intent we created in the previous section.\\nactions-on-google library provides many functionalities to can simplify your task to render rich responses in your action.\"), mdx(\"p\", null, \"We will be adding the following code to display a card when the new intent is invoked.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-1.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/carbon--3-.png\",\n    \"alt\": \"carbon--3-\"\n  }))), mdx(\"p\", null, \"Replace the URL\\u2019s and other contents in the code and stop the previous instance of the app from running and start it again after you have made changes to the code by running \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"npm start\"), \" in the terminal.\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"To test your action you can click on \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"See how it works in Google Assistant\"), \" in the Dialogflow console.\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-3.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-28-175558.png\",\n    \"alt\": \"Annotation-2019-06-28-175558\"\n  }))), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Invoking the intent would give you response similar to this.\")), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-5.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Screenshot_20190628-181019.png\",\n    \"alt\": \"Screenshot_20190628-181019\"\n  }))), mdx(\"p\", null, \"Refer to the links below to add your own functionalities.\"), mdx(\"h2\", {\n    \"id\": \"links-to-refer\"\n  }, \"Links to Refer\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"If you would like to learn more about the actions-on-google library, you can find it here - \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://www.npmjs.com/package/actions-on-google\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://www.npmjs.com/package/actions-on-google\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Go through these examples - \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://developers.google.com/actions/samples/github\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://developers.google.com/actions/samples/github\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Rich responses example - \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://github.com/actions-on-google/dialogflow-conversation-components-nodejs\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://github.com/actions-on-google/dialogflow-conversation-components-nodejs\"))), mdx(\"h2\", {\n    \"id\": \"conclusion\"\n  }, \"Conclusion\"), mdx(\"p\", null, \"Gitpod can make your life much simpler by automating your development setup just by adding a simple configuration file to your repo. You can refer to the Gitpod \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://www.gitpod.io/docs/\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"Docs\"), \" to learn more about the platform. Gitpod lets you work with unlimited workspace but with 100hrs/month runtime. It also provides Personal and unlimited plans as well. If you are a student then you can claim Gitpod Unlimited plan for just $9.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://res-3.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/character.gif\",\n    \"alt\": \"character\"\n  }))), mdx(\"h1\", {\n    \"id\": \"happy-coding-with-gitpod-\"\n  }, \"Happy coding with Gitpod \\u2728\"));\n}\n;\nMDXContent.isMDXComponent = true;","hero":{"full":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsSAAALEgHS3X78AAABWklEQVQoz31SzU7CQBDmVfQZfA2fwPfxqpcmXnwBo+nBi5cmkAai4dBCgFabgpQKgQICrf2hO7tOd9tS0TjZfpmZ9tuZ+aY1xhillBCCjmEYsixjaFlWo9Ho9/uappmmqev6ZDIRXwIAovBrwhPkVqslSRI6juMoitJut5GM2Gw2VVV1XZdxo9zQycnVW8tMmUcEbsfk7EURINCDT6v3/pnMK0cEQkLLOlScnyYo2SlnRhzt9tLAv9Q2+jLmHaYs8WjRZFEHH4j2dLZhBIgYIWtbfl2c3HbP7kc3nfnw3f006+n1qWdrhmU747Ft29Pp1POW9tvA/IivHryd+Qy8SEauj9fnd52Lp6HibH3fT7aLtPuYJlEYRhgGQRDHcRiG69UqJSwJ5rBQs16A5DP3vK+XWbCHfOD/jRbS1CqLETJxnXDsXzrzRYokHMjZHwZAClWFGOXOq+ERfgPd8nKcG+ncDQAAAABJRU5ErkJggg==","aspectRatio":1.7777777777777777,"src":"/static/497338b280462c13b7a6e96a9f6b3c89/f4f8c/hero.png","srcSet":"/static/497338b280462c13b7a6e96a9f6b3c89/206f6/hero.png 236w,\n/static/497338b280462c13b7a6e96a9f6b3c89/84032/hero.png 472w,\n/static/497338b280462c13b7a6e96a9f6b3c89/f4f8c/hero.png 944w,\n/static/497338b280462c13b7a6e96a9f6b3c89/513fc/hero.png 1416w,\n/static/497338b280462c13b7a6e96a9f6b3c89/6eada/hero.png 1888w,\n/static/497338b280462c13b7a6e96a9f6b3c89/ba228/hero.png 1920w","srcWebp":"/static/497338b280462c13b7a6e96a9f6b3c89/99fbb/hero.webp","srcSetWebp":"/static/497338b280462c13b7a6e96a9f6b3c89/77392/hero.webp 236w,\n/static/497338b280462c13b7a6e96a9f6b3c89/1f177/hero.webp 472w,\n/static/497338b280462c13b7a6e96a9f6b3c89/99fbb/hero.webp 944w,\n/static/497338b280462c13b7a6e96a9f6b3c89/4a492/hero.webp 1416w,\n/static/497338b280462c13b7a6e96a9f6b3c89/b0b8f/hero.webp 1888w,\n/static/497338b280462c13b7a6e96a9f6b3c89/30cf3/hero.webp 1920w","sizes":"(max-width: 944px) 100vw, 944px"},"regular":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsSAAALEgHS3X78AAABWklEQVQoz31SzU7CQBDmVfQZfA2fwPfxqpcmXnwBo+nBi5cmkAai4dBCgFabgpQKgQICrf2hO7tOd9tS0TjZfpmZ9tuZ+aY1xhillBCCjmEYsixjaFlWo9Ho9/uappmmqev6ZDIRXwIAovBrwhPkVqslSRI6juMoitJut5GM2Gw2VVV1XZdxo9zQycnVW8tMmUcEbsfk7EURINCDT6v3/pnMK0cEQkLLOlScnyYo2SlnRhzt9tLAv9Q2+jLmHaYs8WjRZFEHH4j2dLZhBIgYIWtbfl2c3HbP7kc3nfnw3f006+n1qWdrhmU747Ft29Pp1POW9tvA/IivHryd+Qy8SEauj9fnd52Lp6HibH3fT7aLtPuYJlEYRhgGQRDHcRiG69UqJSwJ5rBQs16A5DP3vK+XWbCHfOD/jRbS1CqLETJxnXDsXzrzRYokHMjZHwZAClWFGOXOq+ERfgPd8nKcG+ncDQAAAABJRU5ErkJggg==","aspectRatio":1.7777777777777777,"src":"/static/497338b280462c13b7a6e96a9f6b3c89/3e3e7/hero.png","srcSet":"/static/497338b280462c13b7a6e96a9f6b3c89/a123b/hero.png 163w,\n/static/497338b280462c13b7a6e96a9f6b3c89/b6f5d/hero.png 327w,\n/static/497338b280462c13b7a6e96a9f6b3c89/3e3e7/hero.png 653w,\n/static/497338b280462c13b7a6e96a9f6b3c89/de899/hero.png 980w,\n/static/497338b280462c13b7a6e96a9f6b3c89/00f25/hero.png 1306w,\n/static/497338b280462c13b7a6e96a9f6b3c89/ba228/hero.png 1920w","srcWebp":"/static/497338b280462c13b7a6e96a9f6b3c89/0acdf/hero.webp","srcSetWebp":"/static/497338b280462c13b7a6e96a9f6b3c89/ac59e/hero.webp 163w,\n/static/497338b280462c13b7a6e96a9f6b3c89/7660b/hero.webp 327w,\n/static/497338b280462c13b7a6e96a9f6b3c89/0acdf/hero.webp 653w,\n/static/497338b280462c13b7a6e96a9f6b3c89/75470/hero.webp 980w,\n/static/497338b280462c13b7a6e96a9f6b3c89/68d47/hero.webp 1306w,\n/static/497338b280462c13b7a6e96a9f6b3c89/30cf3/hero.webp 1920w","sizes":"(max-width: 653px) 100vw, 653px"},"narrow":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsSAAALEgHS3X78AAABWklEQVQoz31SzU7CQBDmVfQZfA2fwPfxqpcmXnwBo+nBi5cmkAai4dBCgFabgpQKgQICrf2hO7tOd9tS0TjZfpmZ9tuZ+aY1xhillBCCjmEYsixjaFlWo9Ho9/uappmmqev6ZDIRXwIAovBrwhPkVqslSRI6juMoitJut5GM2Gw2VVV1XZdxo9zQycnVW8tMmUcEbsfk7EURINCDT6v3/pnMK0cEQkLLOlScnyYo2SlnRhzt9tLAv9Q2+jLmHaYs8WjRZFEHH4j2dLZhBIgYIWtbfl2c3HbP7kc3nfnw3f006+n1qWdrhmU747Ft29Pp1POW9tvA/IivHryd+Qy8SEauj9fnd52Lp6HibH3fT7aLtPuYJlEYRhgGQRDHcRiG69UqJSwJ5rBQs16A5DP3vK+XWbCHfOD/jRbS1CqLETJxnXDsXzrzRYokHMjZHwZAClWFGOXOq+ERfgPd8nKcG+ncDQAAAABJRU5ErkJggg==","aspectRatio":1.7777777777777777,"src":"/static/497338b280462c13b7a6e96a9f6b3c89/f156e/hero.png","srcSet":"/static/497338b280462c13b7a6e96a9f6b3c89/f2848/hero.png 114w,\n/static/497338b280462c13b7a6e96a9f6b3c89/42f31/hero.png 229w,\n/static/497338b280462c13b7a6e96a9f6b3c89/f156e/hero.png 457w,\n/static/497338b280462c13b7a6e96a9f6b3c89/cf471/hero.png 686w,\n/static/497338b280462c13b7a6e96a9f6b3c89/3bc69/hero.png 914w,\n/static/497338b280462c13b7a6e96a9f6b3c89/ba228/hero.png 1920w","srcWebp":"/static/497338b280462c13b7a6e96a9f6b3c89/15384/hero.webp","srcSetWebp":"/static/497338b280462c13b7a6e96a9f6b3c89/31fce/hero.webp 114w,\n/static/497338b280462c13b7a6e96a9f6b3c89/e3e25/hero.webp 229w,\n/static/497338b280462c13b7a6e96a9f6b3c89/15384/hero.webp 457w,\n/static/497338b280462c13b7a6e96a9f6b3c89/0258d/hero.webp 686w,\n/static/497338b280462c13b7a6e96a9f6b3c89/64ea2/hero.webp 914w,\n/static/497338b280462c13b7a6e96a9f6b3c89/30cf3/hero.webp 1920w","sizes":"(max-width: 457px) 100vw, 457px"},"seo":{"src":"/static/497338b280462c13b7a6e96a9f6b3c89/7ef28/hero.png"}}},{"id":"1c9b7ba4-600d-5e04-b757-367134cc1da8","slug":"/ctf-live-secret-in-claim","secret":false,"title":"CTF.live - Secret in Claim","author":"Anudeep Reddy","date":"August 3rd, 2020","dateForSEO":"2020-08-03T00:00:00.000Z","timeToRead":3,"excerpt":"This post is a walkthrough of a lab from ctflive.","subscription":true,"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"CTF.live - Secret in Claim\",\n  \"author\": \"Anudeep Reddy\",\n  \"date\": \"2020-08-03T00:00:00.000Z\",\n  \"hero\": \"./images/hero.png\",\n  \"excerpt\": \"This post is a walkthrough of a lab from ctflive.\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"This post is a walkthrough of a lab from \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://ctf.live\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"ctflive\"), \". You can find this lab \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://www.ctf.live/challengedetails?cid=47\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"here\"), \", First give it a try yourself before going through this post. It\\u2019s a JWT based challenge. For those of you who don\\u2019t know what a JWT is. don\\u2019t worry there will be a short introduction about that in this post.\"), mdx(\"h1\", {\n    \"id\": \"what-is-jwt\"\n  }, \"What is JWT\\uD83E\\uDD14?\"), mdx(\"p\", null, \"JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties. (source: \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://jwt.io\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"https://jwt.io\"), \"). What does this even mean\\uD83E\\uDD37\\u200D\\u2640\\uFE0F?. \"), mdx(\"p\", null, \"Let us have a look at one of the best explanations i read so far and it\\u2019s by Kasey Speakman. I am dropping his dev profile here, do drop a heart on his actual comment that is linked below.\"), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://dev.to/kspeakman\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"kspeakman on Dev\")), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://dev.to/kspeakman/comment/om9\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"kspeakman\\u2019s take on JWT\")), mdx(\"h2\", {\n    \"id\": \"lets-get-into-the-actual-working-now\"\n  }, \"Let\\u2019s get into the actual working now\"), mdx(\"p\", null, \"A JWT is of the format \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"xxxxxxxxx.yyyyyyyyyyy.zzzzzzzzzzzz\"), \".\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"x\\u2019s specify the algorithm used to sign the JWT in base64.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"y\\u2019s contain the claims in base64.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"z\\u2019s are the signature that is generated with \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"xxxxxxxxx.yyyyyyyyyyy\"), \" as the data.\")), mdx(\"p\", null, \"The Algorithms that are generally used to sign JWT includes:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"HS256 (Symmetric)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"RS256 (Asymmetric)\")), mdx(\"h2\", {\n    \"id\": \"where-are-these-used\"\n  }, \"Where are these used?\"), mdx(\"p\", null, \"As far as our lab is concerned, we use it to authenticate users to a website. So when a user logins to a website the website will issue a JWT with the claims of who the user is and any additional information. This JWT is sent back to the website in the subsequent requests made by the user. The JWT is first verified to check if the signature is legit, it\\u2019s basically done by again signing the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"xxxxxxxxx.yyyyyyyyyyy\"), \" of the token and checking if it matches with the signature that is sent as a part of the JWT. If they are equal then the server can trust the claims that come with the JWT. If any user tries to tamper with the claims in the JWT(the data in yyyyyyyyyyyy part) then the signature won\\u2019t match and in an ideal condition the website should through an unauthorized message.\"), mdx(\"h1\", {\n    \"id\": \"now-the-lab\"\n  }, \"Now the Lab\"), mdx(\"h3\", {\n    \"id\": \"mission-\"\n  }, \"Mission \\uD83D\\uDCBB\"), mdx(\"p\", null, \"Retrieve the secret information present in the token payload!\"), mdx(\"p\", null, \"We are given with a CMS to interact with. The Lab also gives you with the username and password to login to the user account.\"), mdx(\"h3\", {\n    \"id\": \"lets-start\"\n  }, \"Let\\u2019s start\"), mdx(\"p\", null, \"Starting the lab you will be given a virtual environment where the CMS is hosted in your local network and you have a machine with all the tools you will need preinstalled.\"), mdx(\"p\", null, \"The challenge page also gives you few instruction on how to access the CMS that is hosted in your local environment.\"), mdx(\"p\", null, \" \", mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://dev-to-uploads.s3.amazonaws.com/i/cw5ajh16skmk25mfcrrj.png\",\n    \"alt\": \"Lab instructions\"\n  }))), mdx(\"p\", null, \"It says the CMS runs on port 1337 and since I have already worked with a CMS that works on that port, I knew it was \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://strapi.io\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"strapi\"), \" already.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://dev-to-uploads.s3.amazonaws.com/i/ymodt7ntztsr4n1gmbmo.png\",\n    \"alt\": \"Strapi page\"\n  }))), mdx(\"p\", null, \"Now let us try to login with the credentials given. Strapi currently manages admin and end users separately. I assume that the credentials given to us are of the end user. So we can\\u2019t access the strapi admin page with these credentials. All we need is the JWT because out flag is hidden these as the name of the challege suggests.\"), mdx(\"p\", null, \"First we need to find the IP address on which the CMS is hosted. For that run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ifconfig\"), \" in your console to find your IP and then follow the instructions of the challenge to find the IP of the CMS.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://dev-to-uploads.s3.amazonaws.com/i/55zcxc4e198lzkx38jd2.png\",\n    \"alt\": \"ifconfig\"\n  }))), mdx(\"p\", null, \"In my case my IP was 192.142.236.2 and that of the CMS was 192.142.236.3. It is given in the challenge on what is the auth endpoint and the parameters that it accepts.\"), mdx(\"p\", null, \" \", mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://dev-to-uploads.s3.amazonaws.com/i/yvsdjai6skiwa2y2orey.png\",\n    \"alt\": \"Api Endpoints\"\n  }))), mdx(\"p\", null, \"Let us use curl to send the request. I ran the following command to send a post request to the CMS and retrieve the JWT from the response.\"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://dev-to-uploads.s3.amazonaws.com/i/xprsxz9y4jfpi9ac1pkn.png\",\n    \"alt\": \"Alt Text\"\n  }))), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://dev-to-uploads.s3.amazonaws.com/i/1oou9fr14ikphwjxokd8.png\",\n    \"alt\": \"post request curl\"\n  }))), mdx(\"p\", null, \"Now copy that JWT from the console and head over to \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://jwt.io\",\n    \"target\": \"_blank\",\n    \"rel\": \"noreferrer\"\n  }), \"jwt.io\"), \" which will decode the JWT for us. \"), mdx(\"p\", null, mdx(\"img\", _extends({\n    parentName: \"p\"\n  }, {\n    \"src\": \"https://dev-to-uploads.s3.amazonaws.com/i/482chkws77fkqb5kh1ei.png\",\n    \"alt\": \"jwt.io\"\n  }))), mdx(\"h2\", {\n    \"id\": \"voila-theres-our-flag\"\n  }, \"Voila, there\\u2019s our flag\\uD83C\\uDF89.\"), mdx(\"h1\", {\n    \"id\": \"learning\"\n  }, \"Learning\"), mdx(\"p\", null, \"Sometimes developers might end up sending critical information in the JWT. Make sure you check for such information during bug bounty or when you are building your own application.\"));\n}\n;\nMDXContent.isMDXComponent = true;","hero":{"full":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACwElEQVQoz12SWUhUURzGL731GNSDRNpGEBREYVQPtrinpu1lg+1RQWSLc0dHqyktLTI0bRHLyaWSxqlMixp1rLFs1Bm3NIugTaPNF4Noc379722Revj4zrn3nO985zufwoElcHg1vrQYOLpWsA7fEQO+1Gh8aig+U7ggTMegjDEG884ST9u5DPouHOZDcSbvS7J4W5TBp+RoFFRZbAwBbVNSMNocUwSkLARztCBqiFPlUFMonqN7yK15SEV9I9c13GvCXuOi17REBJMjGEyO1Bf2mZdReKuKCmctznt11Nyt07n2L8v3Bie2G5UUX7ZTcuUal65WU2KrpKisnD7TYhSfuPmuC4bRkrKcEa5m/D3dTPB0MU4wqqmD0c2PGKlxUydj23oIuFlHedVtXcycnskp60VKbdfpVeM0h5KLKldOmofbGIdfQzOzOp8ws/URU1va8Wv0MN3TQYDbS2BrF0FdTwmoclB24w65BUWUnsnBXmHjvDh+ozn8IQ77JWQyDHgObWFYTQOKZKLUCyQnpdY9xM5GlAYvw2/e5eDxHAwbNuOtq8blcnH6wiW5sjgcMEWReNtBekc3lvtuJturCah0sOpsLnnHdnMsWyX7hInMrN2Yzp5CzcvCkpfJojXrmDZjBvEGAwXnreQXWnltjEX5qEYx7Y6TiZLXpKZ2Zns78W9/xomcVNgZKDVZIJHMh+2BvHxQz5cqK8/3r2fFtkTmBM0lPCYWNW0/1ssVvzLsF4dTHPWM8T7G393OeIHS3IP5pAX2zuOzVOabVOiHdPJDegKfLCvxHtpK1hkrsXFxhISFcjy/gNJyuwiKw6+S4bV9CZRbNmKzbBCs56JlE90pS/WXH5RaoZVbY62vajADxoV6RV7siuTZjlBe7Y2mNymGr2rEn1cO/g8L9F7+I/ab9bG2R/6TImzW5mG/Ec5P+KVbR/RgvXUAAAAASUVORK5CYII=","aspectRatio":1.7777777777777777,"src":"/static/0f372e8e23957ad5ab3664ca83f23bee/f4f8c/hero.png","srcSet":"/static/0f372e8e23957ad5ab3664ca83f23bee/206f6/hero.png 236w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/84032/hero.png 472w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/f4f8c/hero.png 944w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/513fc/hero.png 1416w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/6eada/hero.png 1888w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/a028c/hero.png 2560w","srcWebp":"/static/0f372e8e23957ad5ab3664ca83f23bee/99fbb/hero.webp","srcSetWebp":"/static/0f372e8e23957ad5ab3664ca83f23bee/77392/hero.webp 236w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/1f177/hero.webp 472w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/99fbb/hero.webp 944w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/4a492/hero.webp 1416w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/b0b8f/hero.webp 1888w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/22dcf/hero.webp 2560w","sizes":"(max-width: 944px) 100vw, 944px"},"regular":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACwElEQVQoz12SWUhUURzGL731GNSDRNpGEBREYVQPtrinpu1lg+1RQWSLc0dHqyktLTI0bRHLyaWSxqlMixp1rLFs1Bm3NIugTaPNF4Noc379722Revj4zrn3nO985zufwoElcHg1vrQYOLpWsA7fEQO+1Gh8aig+U7ggTMegjDEG884ST9u5DPouHOZDcSbvS7J4W5TBp+RoFFRZbAwBbVNSMNocUwSkLARztCBqiFPlUFMonqN7yK15SEV9I9c13GvCXuOi17REBJMjGEyO1Bf2mZdReKuKCmctznt11Nyt07n2L8v3Bie2G5UUX7ZTcuUal65WU2KrpKisnD7TYhSfuPmuC4bRkrKcEa5m/D3dTPB0MU4wqqmD0c2PGKlxUydj23oIuFlHedVtXcycnskp60VKbdfpVeM0h5KLKldOmofbGIdfQzOzOp8ws/URU1va8Wv0MN3TQYDbS2BrF0FdTwmoclB24w65BUWUnsnBXmHjvDh+ozn8IQ77JWQyDHgObWFYTQOKZKLUCyQnpdY9xM5GlAYvw2/e5eDxHAwbNuOtq8blcnH6wiW5sjgcMEWReNtBekc3lvtuJturCah0sOpsLnnHdnMsWyX7hInMrN2Yzp5CzcvCkpfJojXrmDZjBvEGAwXnreQXWnltjEX5qEYx7Y6TiZLXpKZ2Zns78W9/xomcVNgZKDVZIJHMh+2BvHxQz5cqK8/3r2fFtkTmBM0lPCYWNW0/1ssVvzLsF4dTHPWM8T7G393OeIHS3IP5pAX2zuOzVOabVOiHdPJDegKfLCvxHtpK1hkrsXFxhISFcjy/gNJyuwiKw6+S4bV9CZRbNmKzbBCs56JlE90pS/WXH5RaoZVbY62vajADxoV6RV7siuTZjlBe7Y2mNymGr2rEn1cO/g8L9F7+I/ab9bG2R/6TImzW5mG/Ec5P+KVbR/RgvXUAAAAASUVORK5CYII=","aspectRatio":1.7777777777777777,"src":"/static/0f372e8e23957ad5ab3664ca83f23bee/3e3e7/hero.png","srcSet":"/static/0f372e8e23957ad5ab3664ca83f23bee/a123b/hero.png 163w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/b6f5d/hero.png 327w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/3e3e7/hero.png 653w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/de899/hero.png 980w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/00f25/hero.png 1306w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/a028c/hero.png 2560w","srcWebp":"/static/0f372e8e23957ad5ab3664ca83f23bee/0acdf/hero.webp","srcSetWebp":"/static/0f372e8e23957ad5ab3664ca83f23bee/ac59e/hero.webp 163w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/7660b/hero.webp 327w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/0acdf/hero.webp 653w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/75470/hero.webp 980w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/68d47/hero.webp 1306w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/22dcf/hero.webp 2560w","sizes":"(max-width: 653px) 100vw, 653px"},"narrow":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACwElEQVQoz12SWUhUURzGL731GNSDRNpGEBREYVQPtrinpu1lg+1RQWSLc0dHqyktLTI0bRHLyaWSxqlMixp1rLFs1Bm3NIugTaPNF4Noc379722Revj4zrn3nO985zufwoElcHg1vrQYOLpWsA7fEQO+1Gh8aig+U7ggTMegjDEG884ST9u5DPouHOZDcSbvS7J4W5TBp+RoFFRZbAwBbVNSMNocUwSkLARztCBqiFPlUFMonqN7yK15SEV9I9c13GvCXuOi17REBJMjGEyO1Bf2mZdReKuKCmctznt11Nyt07n2L8v3Bie2G5UUX7ZTcuUal65WU2KrpKisnD7TYhSfuPmuC4bRkrKcEa5m/D3dTPB0MU4wqqmD0c2PGKlxUydj23oIuFlHedVtXcycnskp60VKbdfpVeM0h5KLKldOmofbGIdfQzOzOp8ws/URU1va8Wv0MN3TQYDbS2BrF0FdTwmoclB24w65BUWUnsnBXmHjvDh+ozn8IQ77JWQyDHgObWFYTQOKZKLUCyQnpdY9xM5GlAYvw2/e5eDxHAwbNuOtq8blcnH6wiW5sjgcMEWReNtBekc3lvtuJturCah0sOpsLnnHdnMsWyX7hInMrN2Yzp5CzcvCkpfJojXrmDZjBvEGAwXnreQXWnltjEX5qEYx7Y6TiZLXpKZ2Zns78W9/xomcVNgZKDVZIJHMh+2BvHxQz5cqK8/3r2fFtkTmBM0lPCYWNW0/1ssVvzLsF4dTHPWM8T7G393OeIHS3IP5pAX2zuOzVOabVOiHdPJDegKfLCvxHtpK1hkrsXFxhISFcjy/gNJyuwiKw6+S4bV9CZRbNmKzbBCs56JlE90pS/WXH5RaoZVbY62vajADxoV6RV7siuTZjlBe7Y2mNymGr2rEn1cO/g8L9F7+I/ab9bG2R/6TImzW5mG/Ec5P+KVbR/RgvXUAAAAASUVORK5CYII=","aspectRatio":1.7777777777777777,"src":"/static/0f372e8e23957ad5ab3664ca83f23bee/f156e/hero.png","srcSet":"/static/0f372e8e23957ad5ab3664ca83f23bee/f2848/hero.png 114w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/42f31/hero.png 229w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/f156e/hero.png 457w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/cf471/hero.png 686w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/3bc69/hero.png 914w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/a028c/hero.png 2560w","srcWebp":"/static/0f372e8e23957ad5ab3664ca83f23bee/15384/hero.webp","srcSetWebp":"/static/0f372e8e23957ad5ab3664ca83f23bee/31fce/hero.webp 114w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/e3e25/hero.webp 229w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/15384/hero.webp 457w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/0258d/hero.webp 686w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/64ea2/hero.webp 914w,\n/static/0f372e8e23957ad5ab3664ca83f23bee/22dcf/hero.webp 2560w","sizes":"(max-width: 457px) 100vw, 457px"},"seo":{"src":"/static/0f372e8e23957ad5ab3664ca83f23bee/7ef28/hero.png"}}}]}}}