<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Carlos Loredo</title>
    <description>The latest articles on DEV Community by Carlos Loredo (@loboaveces).</description>
    <link>https://dev.to/loboaveces</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F639090%2F194ce8b3-e0ed-4c68-9dce-7c1f47cc3b55.jpeg</url>
      <title>DEV Community: Carlos Loredo</title>
      <link>https://dev.to/loboaveces</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/loboaveces"/>
    <language>en</language>
    <item>
      <title>AWS VPC - Cheat Sheet</title>
      <dc:creator>Carlos Loredo</dc:creator>
      <pubDate>Thu, 08 Jul 2021 02:50:14 +0000</pubDate>
      <link>https://dev.to/loboaveces/aws-vpc-documentation-overview-4f5e</link>
      <guid>https://dev.to/loboaveces/aws-vpc-documentation-overview-4f5e</guid>
      <description>&lt;h1&gt;
  
  
  Virtual Private Cloud
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;VPC&lt;/strong&gt; --&amp;gt; A virtual private network that can be compared with having your own data center inside AWS. An isolated section where you can launch resources with complete control of the virtual network environment.&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LEUPZEoB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2w7cy5mz8xas5wnmmhb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LEUPZEoB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2w7cy5mz8xas5wnmmhb.png" alt="VPC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Concepts:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Subnet&lt;/strong&gt;: A range of IPs inside your VPC (public and private).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route table&lt;/strong&gt;: A set of rules called "routes" that define where the network traffic goes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internet Gateway&lt;/strong&gt;: A gateway attached to your VPC that enables communication of your resource to the Internet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VPC endpoint&lt;/strong&gt;: Privately connect your VPC to other AWS services, powered by a Private Link.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CIDR block&lt;/strong&gt;: A route aggregation methodology, classless, based on the mask.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NAT Gateway&lt;/strong&gt;: Gateway to enable Internet access to resources in Private Subnets, but preventing "the Internet" to initialize connections to them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we can do with a VPC?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Launch instances in a Subnet of our choose.&lt;/li&gt;
&lt;li&gt;Assign custom Subnets IP addresses.&lt;/li&gt;
&lt;li&gt;Configure route tables.&lt;/li&gt;
&lt;li&gt;Create an Internet Gateway (IGW) and attach to your VPC.&lt;/li&gt;
&lt;li&gt;Much better security control over resources.&lt;/li&gt;
&lt;li&gt;Instance Security Groups.&lt;/li&gt;
&lt;li&gt;Access control lists.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*you can only have one IGW attached to a VPC &lt;/p&gt;

&lt;h3&gt;
  
  
  Subnets:
&lt;/h3&gt;

&lt;p&gt;VPC span in all the AZs in the region where they were created, you can put one or more Subnets in each AZ. Each Subnet must reside in one AZ.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Private Subnet&lt;/strong&gt;: A Subnet that has no route to IGW. Instances don't have public IPv4 addresses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public Subnet&lt;/strong&gt;: A Subnet that has a route to IGW in the routing table. An instance in a Public Subnet must have an IPv4 address to connect to the Internet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VPN-only Subnet&lt;/strong&gt;: A Subnet that doesn't have a connection to the Internet, but has attached a virtual private gateway for a site-to-site VPN connection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route tables&lt;/strong&gt;: A set of rules called routes that define where the network traffic goes. You can specify the Route Table for a Subnet, if you don't, it will be associated with the default route table.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*Amazon always reserve 5 IP addresses within your Subnets. &lt;/p&gt;

&lt;h3&gt;
  
  
  Connection:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Internet gateway:&lt;/strong&gt; (IGW) allows communication through the Internet using the AWS network edge. IGW must be attached to the VPC and there must be a route defined in the Route Table.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Site-to-site connection:&lt;/strong&gt; Consists of two tunnels (VPNs) between Private Virtual Gateway or a Transit Gateway and a Customer Gateway.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transit Gateway:&lt;/strong&gt; This is a virtual link to connect your VPCs and On-premises networks. You can connect VPCs, SD-WAN network appliances, AWS Direct Connect Gateway, peering connections to another Transit Gateway, VPN connection.&lt;br&gt;
MTU:1500 bytes for VPC and 8500 MTU between the other services.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Private Link:&lt;/strong&gt; Connect your VPC to other AWS-supported services, also services hosted by other AWS accounts, and AWS Marketplace services. Everything without going through the Internet. To use Private Link you must create a VPC Endpoint.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VPC Endpoint:&lt;/strong&gt; Enables you to connect to your VPC other AWS services powered by Private Link, without going to the Internet. No IGW, NATGW, VPN, or Direct Connect required.&lt;br&gt;
Types of endpoints:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gateway Endpoint:&lt;/strong&gt; An endpoint for S3 and DynamoDB. You must attach a policy to allow access to all or some services. Then it works as a target in the Route table of the Subnet that you want to grant access to those services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interface Endpoint:&lt;/strong&gt; An Elastic Network Interface (ENI) with an IP address of your Subnet. Works as an entry point to supported AWS service traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gateway Load Balancer endpoint:&lt;/strong&gt; A ENI with an IP in the range of your Subnet. Acts as an entry point to intercept traffic (layer 3), works in combination with Elastic Load Balancer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;VPC Peering:&lt;/strong&gt; Connects two VPCs, enabling to route traffic between them privately. You can connect VPCs in your own account or with other accounts. VPCs can be in other regions (inter-region VPC peering).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Communication between non-overlapping CIDR block only.&lt;/li&gt;
&lt;li&gt;No edge-to-edge routing (You can't reach, Direct connect, Internet connections, VPC endpoints, etc.).
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NAT instance:&lt;/strong&gt; An EC2 instances that works as a NAT gateway.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When creating a NAT instance, disable Source/destination check.&lt;/li&gt;
&lt;li&gt;NAT instance  must be in a Public Subnet.&lt;/li&gt;
&lt;li&gt;There must be a route in the Private Subnet to the  NAT instance.&lt;/li&gt;
&lt;li&gt;The amount of traffic depends on the Ec2 instance size used. &lt;/li&gt;
&lt;li&gt;You can create High Availability using Autoscaling groups, multiple subnets in different AZs and a  script automatic fail over for the NAT instance. &lt;/li&gt;
&lt;li&gt;Must be behind a security group.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NAT gateway&lt;/strong&gt; --&amp;gt; A complete gateway that woks for many instances.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Redundancy inside Availability Zone.&lt;/li&gt;
&lt;li&gt;Start at 5Gbps and scales up to 48Gbps.&lt;/li&gt;
&lt;li&gt;No need patch or updates.&lt;/li&gt;
&lt;li&gt;Automatic IP addresses.&lt;/li&gt;
&lt;li&gt;Not associated with Security Groups.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Networking &amp;amp; Security
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Security Groups:&lt;/strong&gt; Works at the instance level and control inbound and outbound traffic. Only allow rules (not deny rules), you can filter traffic based on protocols and ports number. There are inbound and outbound rules. Security groups are stateful. Responses to allowed inbound traffic are allowed to flow out, regardless of outbound rules.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Default Security Group names start with "sg- "&lt;/li&gt;
&lt;li&gt;Security groups can be used in the VPC where were created.&lt;/li&gt;
&lt;li&gt;You can change rules in default Security Groups but, you can't delete them.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Network Access Control List (NACL):&lt;/strong&gt; Control traffic at the Subnet level. Each Subnet must be associated with 1 NACL, but an NACL can be associated with multiple subnets. The rules are evaluated in order starting with the lower number. NACL is stateless, it means that is not implicit that responses to inbound traffic will be allowed and vice-versa.  &lt;/p&gt;

&lt;h3&gt;
  
  
  NACL vs SG:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When you create a new NACL it deny everything, the one created by default allows everything. &lt;/li&gt;
&lt;li&gt;The usage of ephemeral ports on NACL is because we need open ports for the sessions with  different clients. &lt;/li&gt;
&lt;li&gt;In NACL the inbound/outbound rules are applied in chronological order.&lt;/li&gt;
&lt;li&gt;We can have multiple Subnets associations on NACLs &lt;/li&gt;
&lt;li&gt;You can block IP addresses in NACLs, not in Security Groups &lt;/li&gt;
&lt;li&gt;NACL are stateless, SG are stateful.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Flow logs:&lt;/strong&gt; Capture traffic logs going in/out your interfaces inside VPC. You can create flow logs for VPC, Subnets, or Networks Interfaces. Help you control the rules behavior of Security Groups and Network Access Control Lists. Flow logs can be published on CloudWatch logs and S3.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traffic Mirroring:&lt;/strong&gt; Copy traffic from an Elastic Network Interface (ENI) of an EC2 instance to a monitoring appliance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DNS:&lt;/strong&gt; Instances in VPCs are provided with Private and Public DNS names for IPv4 addresses.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Other important stuff:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Direct Connect:&lt;/strong&gt; A service that bypasses the Internet using a direct connection between your On-premises network and AWS services or VPC.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Global Accelerator:&lt;/strong&gt; Improve the performance of applications creating acceleration. An accelerator directs traffic to optimal endpoints over AWS global network. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;By default it provides two static IP addresses that you associate with your accelerator, alternatively you can bring  your own. &lt;/li&gt;
&lt;li&gt;Global Accelerator assigns each accelerator a default DNS that point to static IP addresses.&lt;/li&gt;
&lt;li&gt;Network zone service. The static IP addresses for the  accelerator  from a unique Subnet (similar to AZs) --&amp;gt; 2 IP addresses &lt;/li&gt;
&lt;li&gt;Listener processes inbound connection to accelerator based on port and protocol (TCP &amp;amp; UPD protocols) &lt;/li&gt;
&lt;li&gt;Endpoints groups are associated with AWS regions, you can adjust the % of traffic (setting  the traffic dial). &lt;/li&gt;
&lt;li&gt;Endpoints (EC2 instances, load balancers, IP addresses) can be configured with different weights. &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>vpc</category>
      <category>cloud</category>
      <category>networking</category>
    </item>
    <item>
      <title>Saas: La metodología de 12 factores explicada</title>
      <dc:creator>Carlos Loredo</dc:creator>
      <pubDate>Mon, 21 Jun 2021 00:13:26 +0000</pubDate>
      <link>https://dev.to/loboaveces/saas-la-metodologia-de-12-factores-explicada-3ip2</link>
      <guid>https://dev.to/loboaveces/saas-la-metodologia-de-12-factores-explicada-3ip2</guid>
      <description>&lt;p&gt;La metodología de doce-factores es una metodología para crear aplicaciones de software como servicio (Saas). Consta de  algunas "mejores prácticas" diseñadas para permitir que las aplicaciones web se creen con portabilidad y resiliencia.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--83UDMaL8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8uyn56ay1tf8dsc5o7ej.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--83UDMaL8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8uyn56ay1tf8dsc5o7ej.jpg" alt="12-factores_img"&gt;&lt;/a&gt;&lt;br&gt;
Para comprender esta metodología podemos dividir los doce factores en 3 componentes clave:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xArfJeCt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mop1e47n55jgyzp5ugzm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xArfJeCt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mop1e47n55jgyzp5ugzm.png" alt="12-factores-3-componentes"&gt;&lt;/a&gt;&lt;br&gt;
A continuación, veremos las mejores prácticas que se debe seguir en cada factor para que nuestra aplicación cumpla con esta metodología.&lt;/p&gt;

&lt;h2&gt;
  
  
  Factores de código:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Factor 1 - Código base:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k1qMpU9d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88bat7esyojurnh3a8eu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k1qMpU9d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88bat7esyojurnh3a8eu.png" alt="codebase_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Se debe hacer seguimiento a los cambios en el código desden un sistema de control de versiones (VCS) como Github, BitBucket, etc.&lt;/li&gt;
&lt;li&gt;Relación uno a uno entre el código base y la aplicación.&lt;/li&gt;
&lt;li&gt;Puede haber múltiples implementaciones de la aplicación.&lt;/li&gt;
&lt;li&gt;Pueden haber diferentes versiones del código base en cada implementación.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 5: Compila, publica y ejecuta:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ul0L5ykL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqdkfa5ujzqt3hlctzj8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ul0L5ykL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqdkfa5ujzqt3hlctzj8.png" alt="build_release_run_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build (Compilación): transforma un código base en una unidad ejecutable llamada build.&lt;/li&gt;
&lt;li&gt;Release (Lanzamiento): Combina el build con la configuración para que esté listo para ejecutarse.&lt;/li&gt;
&lt;li&gt;Ejecución: ejecuta la aplicación.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 10 - Paridad Dev/Prod:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IgRTzYKj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4pcf5i767q74tvl8alwp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IgRTzYKj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4pcf5i767q74tvl8alwp.png" alt="dev_prod_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimiza las diferencias entre los entornos de implementación y producción.&lt;/li&gt;
&lt;li&gt;Los servicios de back-end deben ser los mismos en todos los entornos (dev/prod).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Factores de implementación:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Factor 2 - Dependencias:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ucqBffgk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwo8742ttq3rbi120am5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ucqBffgk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwo8742ttq3rbi120am5.jpeg" alt="dependencia_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ten en cuenta que una aplicación solo es confiable como su dependencia menos confiable.&lt;/li&gt;
&lt;li&gt;Asegúrate de que el código declare explícitamente cualquier dependencia.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 3 - Configuración:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p_IxD_oP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tivn8wk9v1yvqarq47c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p_IxD_oP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tivn8wk9v1yvqarq47c.png" alt="config_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;La configuración contiene todo lo que varía entre las implementaciones, como las credenciales y las ubicaciones de los servicios de respaldo.&lt;/li&gt;
&lt;li&gt;Las configuraciones deben mantenerse separadas del código&lt;/li&gt;
&lt;li&gt;Almacena la configuración en variables de entorno.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 4 - Servicios de back-end:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4YPxemg_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r94g7io1nlu15tdsocq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4YPxemg_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r94g7io1nlu15tdsocq7.png" alt="back_end_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Las aplicaciones no deben distinguir entre servicios de back-end locales y de terceros.&lt;/li&gt;
&lt;li&gt;Se debe acceder a todos los servicios mediante URLs y credenciales para que puedan intercambiarse sin cambiar el código.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 6 - Procesos:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KpGrb16t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hcklo53ws070o5i0srs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KpGrb16t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hcklo53ws070o5i0srs.png" alt="process_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Stateless" y no comparten nada.&lt;/li&gt;
&lt;li&gt;Los servicios de respaldo almacenan datos persistentes ya que la memoria y los sistemas de archivos no se comparten entre los procesos.&lt;/li&gt;
&lt;li&gt;Los datos se almacenan de forma centralizada.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 7 - Enlace a través de puertos:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LzV24ftG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67qg3oel4zzh9bxw1980.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LzV24ftG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67qg3oel4zzh9bxw1980.png" alt="ports_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exportación de servicios designando un puerto. HTTP y otros servicios se exportan de esta manera.&lt;/li&gt;
&lt;li&gt;Para vincular un puerto normalmente debe declarar una biblioteca de servidor web.&lt;/li&gt;
&lt;li&gt;Las aplicaciones pueden ser servicios que sean llamadas por otras aplicaciones a través de la URL y el puerto.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 9 - Desechabilidad:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l4CVczc6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/po4etp9xuwa9543758a3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l4CVczc6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/po4etp9xuwa9543758a3.png" alt="disposability_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Las aplicaciones deben tener un tiempo de inicio de proceso mínimo y un cierre o terminación de la applicación eficiente.&lt;/li&gt;
&lt;li&gt;Implementar código y configurar cambios rápidamente.&lt;/li&gt;
&lt;li&gt;Escale aplicaciones fácilmente.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 11 - Registros (logs):
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--598r2wTP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b7y490pmgjd6yljdfnyx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--598r2wTP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b7y490pmgjd6yljdfnyx.png" alt="logs_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Las aplicaciones no deben preocuparse por almacenar registros (logs).&lt;/li&gt;
&lt;li&gt;Las aplicaciones deben tener registros de tendencias en forma de un flujo de eventos escrito en stdout.&lt;/li&gt;
&lt;li&gt;El entorno de ejecución captura el flujo de todas las aplicaciones, agrega los registros y enruta los registros a su destino.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Factores operativos:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Factor 8 - Simultaneidad:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a8vgmFba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xlapzhnskergfq9tqs7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a8vgmFba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xlapzhnskergfq9tqs7.png" alt="concurrency_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Se pueden utilizar procesos concurrentes para escalar la aplicación.&lt;/li&gt;
&lt;li&gt;Los procesos sin estado se pueden activar sin crear dependencias en otros procesos.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Factor 12 - Procesos de administración:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7UwfJorT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/goltagu96akqskkt2uzc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7UwfJorT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/goltagu96akqskkt2uzc.png" alt="admin_process_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Habilite procesos únicos de administración de aplicaciones, como la migración de bases de datos.&lt;/li&gt;
&lt;li&gt;Ejecutar contra una versión con la misma configuración del código base.&lt;/li&gt;
&lt;li&gt;Están incluidos en el código de la aplicación.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Fuentes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;El sitio web de la Metodología de los Doce Factores: &lt;a href="https://12factor.net/"&gt;12factor&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>saas</category>
      <category>serverless</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>SaaS: The Twelve-Factor app methodology explained</title>
      <dc:creator>Carlos Loredo</dc:creator>
      <pubDate>Sun, 20 Jun 2021 23:45:40 +0000</pubDate>
      <link>https://dev.to/loboaveces/saas-the-twelve-factor-app-methodology-explained-3cjl</link>
      <guid>https://dev.to/loboaveces/saas-the-twelve-factor-app-methodology-explained-3cjl</guid>
      <description>&lt;p&gt;The Twelve-Factor App methodology is a methodology for building software-as-a-service applications. These best practices are designed to enable applications to be built with portability and resilience when deployed to the web.&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--83UDMaL8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8uyn56ay1tf8dsc5o7ej.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--83UDMaL8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8uyn56ay1tf8dsc5o7ej.jpg" alt="12-factors_img"&gt;&lt;/a&gt;&lt;br&gt;
To understand this methodology we can divide the twelve factors into 3 key components:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xArfJeCt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mop1e47n55jgyzp5ugzm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xArfJeCt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mop1e47n55jgyzp5ugzm.png" alt="12-factors-3-components"&gt;&lt;/a&gt; &lt;br&gt;
Next, we'll see the best practices that you should follow for every factor to comply with what this methodology says.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Factors:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Factor 1 - CodeBase:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k1qMpU9d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88bat7esyojurnh3a8eu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k1qMpU9d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88bat7esyojurnh3a8eu.png" alt="codebase_img"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code must be tracked in a version control system (VCS) like Github, BitBucket, etc. &lt;/li&gt;
&lt;li&gt;One-to-One relationship between the CodeBase and the application. &lt;/li&gt;
&lt;li&gt;There can be multiple deploys of the application.&lt;/li&gt;
&lt;li&gt;Different versions of the CodeBase can be in each deployment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 5 - Build, release and run:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ul0L5ykL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqdkfa5ujzqt3hlctzj8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ul0L5ykL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqdkfa5ujzqt3hlctzj8.png" alt="build_release_run_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build: Transform a CodeBase into an executable unit called build.&lt;/li&gt;
&lt;li&gt;Release: Combine build with configuration so that it's ready to run.&lt;/li&gt;
&lt;li&gt;Run: Runs the application.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 10 - Dev/Prod parity:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IgRTzYKj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4pcf5i767q74tvl8alwp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IgRTzYKj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4pcf5i767q74tvl8alwp.png" alt="dev_prod_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimize differences between deployment and production environments.&lt;/li&gt;
&lt;li&gt;Back-end services should be the same across environments (dev/prod)
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Deploy Factors:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Factor 2 - Dependencies:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ucqBffgk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwo8742ttq3rbi120am5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ucqBffgk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwo8742ttq3rbi120am5.jpeg" alt="dependecy_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Be aware that an app is only reliable as its least reliable dependency.&lt;/li&gt;
&lt;li&gt;Be sure that code explicitly declares any dependency.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 3 - Config:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p_IxD_oP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tivn8wk9v1yvqarq47c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p_IxD_oP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tivn8wk9v1yvqarq47c.png" alt="config_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Config contains everything that varies between deploys such as credentials and backing services locations.&lt;/li&gt;
&lt;li&gt;Configs must be kept separate from the code&lt;/li&gt;
&lt;li&gt;Store config in environment variables.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 4 - Backing services:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4YPxemg_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r94g7io1nlu15tdsocq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4YPxemg_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r94g7io1nlu15tdsocq7.png" alt="back_end_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applications should not distinguish between local and third-party back-end services.&lt;/li&gt;
&lt;li&gt;All services should be accessed by URL and credentials so that can be swapped without changing the code.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 6 - Processes:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KpGrb16t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hcklo53ws070o5i0srs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KpGrb16t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hcklo53ws070o5i0srs.png" alt="process_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stateless and share nothing.&lt;/li&gt;
&lt;li&gt;Backing services store persistent data since memory and filesystems are not shared across processes.&lt;/li&gt;
&lt;li&gt;Data is centrally stored.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 7 - Port binding:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LzV24ftG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67qg3oel4zzh9bxw1980.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LzV24ftG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67qg3oel4zzh9bxw1980.png" alt="ports_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Export services by port binding. HTTP and other services are exported in this way.&lt;/li&gt;
&lt;li&gt;To bind a port usually you must declare a web server library.&lt;/li&gt;
&lt;li&gt;Applications can be backing services for other applications.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 9 - Disposability:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l4CVczc6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/po4etp9xuwa9543758a3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l4CVczc6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/po4etp9xuwa9543758a3.png" alt="disposability_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applications should have minimal process start-time and graceful termination.&lt;/li&gt;
&lt;li&gt;Quickly deploy code and configure changes.&lt;/li&gt;
&lt;li&gt;Easily scale applications. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Factor 11 - Logs:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--598r2wTP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b7y490pmgjd6yljdfnyx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--598r2wTP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b7y490pmgjd6yljdfnyx.png" alt="logs_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applications should not concern themselves with storing logs.&lt;/li&gt;
&lt;li&gt;Applications should trend logs as event stream written to stdout.&lt;/li&gt;
&lt;li&gt;Execution environment captures the stream for all apps aggregates the logs and routes logs to their destination.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Operate Factors:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Factor 8 - Concurrency:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a8vgmFba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xlapzhnskergfq9tqs7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a8vgmFba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xlapzhnskergfq9tqs7.png" alt="concurrency_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Concurrent processes can be used to scale the application.&lt;/li&gt;
&lt;li&gt;Stateless processes can be spun up without creating dependencies on other processes.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Factor 12 - Admin processes:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7UwfJorT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/goltagu96akqskkt2uzc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7UwfJorT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/goltagu96akqskkt2uzc.png" alt="admin_process_img"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable one-off application management processes such as database migration.&lt;/li&gt;
&lt;li&gt;Run against a release using the same CodeBase configuration.&lt;/li&gt;
&lt;li&gt;Are included in the application code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sources:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The Twelve-Factors Methodology website: &lt;a href="https://12factor.net/"&gt;12factor&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>saas</category>
      <category>cloud</category>
      <category>devops</category>
      <category>serverless</category>
    </item>
    <item>
      <title>AWS IAM users, groups and roles explained in an airport</title>
      <dc:creator>Carlos Loredo</dc:creator>
      <pubDate>Fri, 11 Jun 2021 23:54:31 +0000</pubDate>
      <link>https://dev.to/loboaveces/aws-iam-users-groups-and-roles-explained-in-an-airport-399a</link>
      <guid>https://dev.to/loboaveces/aws-iam-users-groups-and-roles-explained-in-an-airport-399a</guid>
      <description>&lt;h2&gt;
  
  
  First, what is this IAM thing about?
&lt;/h2&gt;

&lt;p&gt;Imagine a really big airport, like Hartsfield–Jackson Airport in Atlanta (U.S) or Beijing International Airport (China) with hundreds of airline offices, a lot of flights arriving and leaving, employees doing their different jobs, and many people going around. Even if we don't know exactly how everything works in an airport, we can be sure that it works.&lt;br&gt;&lt;br&gt;
Well, to understand Identity access management (IAM) we can think of Amazon Web Services (AWS) as a big Airport with hundreds of services (airlines), traffic between services (flights), and many users with different roles taking advantage of cloud services (people).&lt;br&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3oypxe2occxlx053i6vh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3oypxe2occxlx053i6vh.jpg" alt="Airport"&gt;&lt;/a&gt;&lt;br&gt;
What I'm trying with this example, is to explain how IAM users, groups, and roles work, because I see many new developers struggling with these concepts. If you read this I hope that clarifies everything for you. Let me know in a comment how it was, and how it can improve.&lt;br&gt;
OK, let's do this!&lt;br&gt;&lt;br&gt;
I think that we've all been to the airport at least one time, right? Well, I don't know if you noticed but in airports, there is a complex access control system to keep individuals out of restricted areas and maintain the facilities secure, it is composed of a lot of people with different roles, scanners, cameras, and many other devices and equipment. All of them are there to maintain the security of the airport (infrastructure, airlines, and passengers)&lt;br&gt;&lt;br&gt;
Ok, we can say that Identity Access Management is the same, is the service that provides access control in AWS, so it controls all the access to AWS resources. Is important to say that IAM is not the only service that provides security, but is the most important. And is also composed of different elements, features, and tools.  &lt;/p&gt;

&lt;h2&gt;
  
  
  The root user:
&lt;/h2&gt;

&lt;p&gt;In an airport, airlines rent offices to operate and offer flights to their customers. There are big international airlines and also small airlines with local operations. (Just like the users of AWS) When an airline company wants to operate in the airport they sign a contract (terms of use) to use the airport services. Let's say that the contract is signed by the regional manager who represents the airline in that airport, We could say that he gets the office keys that allow him to access anywhere.&lt;br&gt;&lt;br&gt;
When you create an AWS account, you accept some terms and conditions for the service, and immediately you have access to all the services. This account is called the root account and with this account, you have all the permissions to create resources, assign new users and manage all your infrastructure and applications in AWS services.&lt;br&gt;&lt;br&gt;
Let's continue, the manager shouldn't do everything, right? he or she can't run an airline office by itself, there have to be a lot of people that work for the company. What he can do is hire more staff. There can be sales agents, operations agents, baggage handlers, flight dispatchers, administrative support staff, among others. In the end, the manager will only sit at his desk eating donuts like a boss. (I don't know if that's the case of a true manager but for this example it is).&lt;br&gt;&lt;br&gt;
When you first create an AWS account, you begin with a single sign-in identity that has complete access to all the services and resources in the account. This identity is called the AWS account root user. You can sign in as the root user using the email address and password that you used to create the account.&lt;br&gt;&lt;br&gt;
AWS strongly recommends that you do not use the root user for your everyday tasks, even the administrative ones. Instead, create IAM users and assign them different permissions to perform different tasks. Then securely lock away the root user credentials and use them to perform only a few account and service management tasks. Let that account rest eating donuts.  &lt;/p&gt;

&lt;h2&gt;
  
  
  IAM Users:
&lt;/h2&gt;

&lt;p&gt;Airports are divided into landside and airside zones. The landside is subject to fewer special laws and is part of the public realm, while access to the airside zone is tightly controlled. The airside area includes all parts of the airport around the aircraft and the parts of the buildings that are restricted to staff.&lt;br&gt;&lt;br&gt;
Let's suppose that the manager hired some people to perform different jobs and gave them credentials and different permissions to access different areas. For example, the sales agents are at the counter in contact with clients but will never enter the airside area; the baggage handlers on the other hand are allowed to enter the airside area to carry the luggage to the aircraft.&lt;br&gt;&lt;br&gt;
Well, in AWS is almost the same. An IAM user is an entity that you create in AWS to represent the person or application that uses it to interact with AWS. A user in AWS consists of a name and credentials that can access AWS in different ways depending on what services and resources it is allowed to use.&lt;br&gt;&lt;br&gt;
A brand new IAM user created using the AWS CLI or AWS API has no credentials of any kind. You must create the type of credentials for an IAM user based on the needs of your user.  &lt;/p&gt;

&lt;h3&gt;
  
  
  IAM Groups:
&lt;/h3&gt;

&lt;p&gt;Do you know RFID cards? These are the cards that are used to grant access to restricted areas to the cardholder. So you can program which doors will open with that card.&lt;br&gt;
In this case, the manager decided to give the employees RFID cards of different colors depending on the access permissions that they need. For example, there is a group of ten people in charge of the maintenance of aircraft. All of them, who received the orange card, can access the same restricted areas in the airside zone.&lt;br&gt;&lt;br&gt;
Let's suppose that an employee is promoted to a new job. What happens then? Well, it's simple, he will be part of another group, so he will return his card and receive a new one.&lt;br&gt;&lt;br&gt;
An IAM user group is a collection of IAM users. User groups let you specify permissions for multiple users, which can make it easier to manage the permissions for those users. For example, you could have a user group called "Devs" and give that user group the types of permissions that developers typically need. Any user in that user group automatically has the permissions that are assigned to the user group. If a new user joins your organization and needs developer privileges, you can assign the appropriate permissions by adding the user to that user group. Similarly, if a person changes jobs in your organization, instead of editing that user's permissions, you can remove him or her from the old user groups and add him or her to the appropriate new user groups.  &lt;/p&gt;

&lt;h3&gt;
  
  
  IAM Roles:
&lt;/h3&gt;

&lt;p&gt;Imagine that every three months a third-party auditory team must enter the office and check how all operations are being carried out. The manager is not going to generate RFID cards for them, because they may not be the same people who visit the office every time, and because they are not part of the company.&lt;br&gt;&lt;br&gt;
To resolve this, the manager decides to create predefined cards with all the permissions that they will need in their auditors' role. So these people get these cards only for the period that they remain in the offices, later when they have done with their job, they have to return the cards and they lose all the access that had granted.&lt;br&gt;&lt;br&gt;
An IAM role is an IAM identity that you can create in your account that has specific permissions. An IAM role is similar to an IAM user. However, instead of being uniquely associated with one person, a role is intended to be assumable by anyone who needs it. Also, a role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides you with temporary security credentials for your role session.&lt;br&gt;&lt;br&gt;
You can use roles to delegate access to users, applications, or services that don't normally have access to your AWS resources. For example, you might want to grant users in your AWS account access to resources they don't usually have, or grant users in one AWS account access to resources in another account. Or you might want to allow a mobile app to use AWS resources, but not want to embed AWS keys within the app (where they can be difficult to rotate and where users can potentially extract them). Sometimes you want to give AWS access to users who already have identities defined outside of AWS, such as in your corporate directory. Or, you might want to grant access to your account to third parties so that they can perform an audit on your resources.  &lt;/p&gt;

</description>
      <category>aws</category>
      <category>iam</category>
      <category>cloud</category>
      <category>security</category>
    </item>
  </channel>
</rss>
