---
title: All blocks
slug: self-service-kb/all-blocks
description: Learn about the key AWS services, including API Gateway, Polly, and Connect, and how they can be used to create a robocall system. Discover the simplicity and power of AWS, suitable even for free tier users. Explore code examples, diagrams, and a changelo
docTags: 
createdAt: 2022-11-30T09:31:51.000Z
---

::Image[]{src="https://cdn-images-1.medium.com/max/1600/1*AD9ZSLXKAhZ-_WomszsmPg.png" size="30" width="1600" height="601" caption="DOGMATIC" position="center" showCaption="true"}

What is **AWS**? This was a question I didn’t fully have an answer to, until now. Back when I was first trying to understand what `Amazon` Web Services was, just like anyone else would, I searched on Google.&#x20;

:::BlockQuote
Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow.
:::

# AWS = Lego Blocks

::Image[]{src="https://cdn-images-1.medium.com/max/1600/1*rPuYOAsFB-y88COgvGLrBQ.jpeg" size="62" position="center" width="1600" height="874" darkWidth="1600" darkHeight="874" showCaption="false"}

Think of Lego blocks. Very simple in appearance and functionality on their own. **However**, put them together in the right way, with the right pieces, you can create something highly complex and amazing.

::Image[]{src="https://cdn-images-1.medium.com/max/1600/1*jNtYTbavI4fMCKhwKL9-Rg.jpeg" size="64" width="982" height="613" darkWidth="982" darkHeight="613" showCaption="false"}

This is what AWS allows. AWS is a compilation of many different Lego pieces that all have their own simple functions. Although on their own they may lack much functionality; combined together with other services, they can construct a highly complex, *practical application*. Through AWS, Amazon has solely provided users with a huge **Lego toolbox** where you can pick and choose which services you would like to use and for how long. It is completely up to the user how they’ll construct their Lego masterpiece.

One of the biggest reasons why AWS has become so popular, is because of the complete freedom it allows consumers. Not only are you able to mix and match its services, Amazon offers three different methods to manage and utilise AWS: through the CLI, the AWS console (GUI), or SDKs. To top it all off, the highly competitive pricing makes AWS an offer hard to refuse.

# Opening the AWS Lego Toolbox

In this section I will display some key Amazon Web Services as well as some others I used in a recent project.

### Simple Storage Service (S3)

As the name suggests, AWS S3 is a storage service. It provides automatic scaling — meaning you don’t have to worry about running out of storage — and it is extremely reliable… like 99.999999999% reliable. Through the concept of “buckets”, S3 can be used to store log files, photos for your application, and even to serve static websites that don’t require server side technologies.

### Elastic Cloud Computing (EC2)

EC2 allows you put virtual servers in the cloud. If you don’t know anything about cloud computing, this means that AWS is removing the need to purchase actual hardware to have servers. Just like S3, there is automatic scaling — meaning depending on the demand, the amount of servers can be automatically increased. Paired together with AWS S3 and AWS Relational Database (RDS), you are able to create a full back-end, front-end, and database, all based in the cloud.

### Identity and Access Management (IAM)

Whenever you need to programmatically access AWS services you will need to have two different access keys: an access key ID, and a secret access key. However, for the sake of security, you would not want these keys to be able to access all of your account. This is where IAM can come into play. Through IAM, you can create AWS users and groups, use permissions to allow and deny their access to AWS resources, and delete users and groups when access is no longer required. Thus, IAM highly improves security and gives you the ability to allow outside accounts to access your account’s specific services.

### Lambda

In essence, Lambda allows you to have a “serverless” application. This does not mean you do not have a server at all; instead, it means it removes the need to provision and manage servers (whether they be physical or virtual). Explained simply, Lambda runs code that you specify, based on a trigger that you also specify. These triggers can be HTTP requests with API Gateway, changes in a specific S3 bucket, updates in your database, and so on. Lambda provides infinite flexibility and a highly affordable serverless option for applications.

### API Gateway

API Gateway is a simple service that allows you to build, deploy and manage APIs. Through a matter of a few minutes in the AWS console you are able to have a fully functioning RESTful API to a distinct URL endpoint. API Gateway is able to simultaneously handle all your API calls, while providing traffic management, authorization and access control, and monitoring.

### Polly

Through Artificial Intelligence, AWS Polly is able to turn text into lifelike speech. It works with dozens of different languages — for example, Chinese, Russian, Turkish, Spanish, and Korean — with usually several voices for each language.

### Connect

AWS Connect provides you the capability to have a simple, cloud-based call center. Through the AWS console, you can construct different “Contact Flows” (where you create distinct user experiences for outbound or inbound calls), manage different calling ‘agents’, and track performance metrics.

# My Experience with AWS

In my most recent project, I combined together Connect (with Polly built in), Lambda, API Gateway, and S3 to create a fully functioning robocall system with a basic front-end. A user is able to access my static website that is hosted through S3, input the phone number they would like to call and the text they would like to change to speech. Once submitted, a request is sent to API Gateway, which then triggers a special Lambda function which calls the number that was inputted, with the text that was also inputted.

In my experience, using AWS was extremely simple, and provided a vast range of capabilities. Even though my account is in the free-tier I was able to confidently and easily use all of the AWS services without fear I was going to spend any money. AWS has provided users many different resources to learn all their services, and through a 1 year free trial, you are able to test every single one of their services. I would highly recommend anyone to at least try learning. In this blog, I only showcased seven Amazon Web Services, however, AWS has over 90 different services in over 20 different categories.

- list 1
- list 2
  - list 2.1
    - list 2.1.1
  - list 2.2
- list 3

* [ ] check list 1
* [x] check list 2

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://api.cakes.com/v1/cakes/:id",
  "name": "Get Cakes ",
  "method": "POST",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "ID of the cake to get, \n for free of course."
      }
    ],
    "queryParameters": [
      {
        "kind": "required",
        "name": "recipe",
        "type": "string",
        "description": "The API will do its best to find \n a cake matching the provided recipe."
      },
      {
        "kind": "required",
        "name": "gluten",
        "type": "boolean",
        "description": "Whether the cake should be \n gluten-free or not."
      }
    ],
    "headerParameters": [
      {
        "kind": "required",
        "name": "X-Auth-Token",
        "type": "string",
        "description": "Authentication token to track \n down who is emptying our stocks."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "4tgeNTSG2phzBtvjl3TJc",
        "code": "{\n    \"name\": \"Cake's name\",\n    \"recipe\": \"Cake's recipe name\",\n    \"cake\": \"Binary cake\"\n}",
        "language": "202"
      },
      {
        "id": "4VwXN3GKaXonEtOJjBfTk",
        "code": "{\n    \"message\": \"Ain't no cake like that.\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "4tgeNTSG2phzBtvjl3TJc"
  },
  "examples": {
    "languages": [
      {
        "id": "ETxf3D2KbcAYhHG4CcU4e",
        "code": "curl --request GET\n  --url https://api.cakes.com/v1/cakes/:id \n  --header 'Accept: application/json'",
        "language": "curl"
      },
      {
        "id": "d3H-pu6-cEALAUj522NGW",
        "code": "fetch(\"https://api.cakes.com/v1/cakes/:id\", {\n  \"method\": \"GET\",\n  \"headers\": {\n    \"Accept\": \"application/json\"\n  }\n})\n.then(response => {\n  console.log(response);\n})\n.catch(err => {\n  console.error(err);\n});",
        "language": "javascript"
      },
      {
        "id": "xPo27KeQOSPmLC3gujaDQ",
        "code": "const fetch = require('node-fetch');\n\nlet url = 'https://api.cakes.com/v1/cakes/:id';\nlet options = {\n  method: 'GET', \nheaders: {\n    Accept: 'application/json',\n  }\n};\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));",
        "language": "nodejs"
      },
      {
        "id": "lkVPrXQAWF9oXoIl1Mtzn",
        "code": "import requests\n\nurl = \"https://api.cakes.com/v1/cakes/:id\"\nheaders = {\"Accept\": \"application/json\"}\nresponse = requests.request(\"GET\", url, headers=headers)\nprint(response.text)",
        "language": "python"
      },
      {
        "id": "2XpgBQUr0_B4W8NyQ3xV8",
        "code": "const fetch = require('node-fetch');\n\nlet url = 'https://api.cakes.com/v1/cakes/:id';\nlet options = {method: 'GET', headers: {Accept: 'application/json'}};\nfetch(url, options)\n  .then(res => res.json())\n  .then(json => console.log(json))\n  .catch(err => console.error('error:' + err));",
        "language": "ruby"
      }
    ],
    "selectedLanguageId": "ETxf3D2KbcAYhHG4CcU4e"
  },
  "responses": [
    {
      "statusCode": "202",
      "description": "Cake successfully retrieved.",
      "jsonExample": "{\n    \"name\": \"Cake's name\",\n    \"recipe\": \"Cake's recipe name\",\n    \"cake\": \"Binary cake\"\n}"
    },
    {
      "statusCode": 404,
      "description": "Could not find a cake matching this query.",
      "jsonExample": "{\n    \"message\": \"Ain't no cake like that.\"\n}"
    }
  ],
  "description": "This endpoint allows you to get free cakes.",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  }
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://api.cakes.com",
  "name": "Get Cakes",
  "method": "PUT",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "id",
        "type": "string",
        "description": "ID of the cake to get"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "mK3yhos1_IXFv_YBZ-7bm",
        "code": "{\n    \"name\": \"Cake's name\",\n}",
        "language": "200"
      },
      {
        "id": "4HlYpCAIsdUGyb57MkySd",
        "code": "{\n    \"message\": \"Ain't no cake like that.\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "mK3yhos1_IXFv_YBZ-7bm"
  },
  "examples": {
    "languages": [
      {
        "id": "lPO6Y-91FQG3of6er4ZQl",
        "code": "fetch(\"https://api.cakes.com\", {\n  \"method\": \"GET\",\n  \"headers\": {\n    \"Accept\": \"application/json\"\n  }\n})\n.then(response => {\n  console.log(response);\n})\n.catch(err => {\n  console.error(err);\n});",
        "language": "javascript"
      }
    ],
    "selectedLanguageId": "lPO6Y-91FQG3of6er4ZQl"
  },
  "description": "Get a cake by its ID",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

:::CodeblockTabs
```csharp
/*
 * C# Program to Check Whether the Entered Year is a Leap Year or Not
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace Program
{
    class leapyear
    {
        static void Main(string[] args)
        {
            leapyear obj = new leapyear();
            obj.readdata();
            obj.leap();
        }
        int y;
        public void readdata()
        {
            Console.WriteLine("Enter the Year in Four Digits : ");
            y = Convert.ToInt32(Console.ReadLine());
        }
        public void leap()
        {
            if ((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0))
            {
                Console.WriteLine("{0} is a Leap Year", y);
            }
            else
            {
                Console.WriteLine("{0} is not a Leap Year", y);
            }
            Console.ReadLine();
        }
    }
}
```

```go
// We can use channels to synchronize execution
// across goroutines. Here's an example of using a
// blocking receive to wait for a goroutine to finish.
// When waiting for multiple goroutines to finish,
// you may prefer to use a [WaitGroup](waitgroups).

package main

import "fmt"
import "time"

// This is the function we'll run in a goroutine. The
// `done` channel will be used to notify another
// goroutine that this function's work is done.
func worker(done chan bool) {
    fmt.Print("working...")
    time.Sleep(time.Second)
    fmt.Println("done")

    // Send a value to notify that we're done.
    done <- true
}

func main() {

    // Start a worker goroutine, giving it the channel to
    // notify on.
    done := make(chan bool, 1)
    go worker(done)

    // Block until we receive a notification from the
    // worker on the channel.
    <-done
}

```

```none
gegregerg qwe
```

```php
<?php>

```

```python
# Python3 program to demonstrate 
# the use of sample() function . 
  
# import random  
import random 
  
  
# Prints list of random items of 
# length 3 from the given list. 
list1 = [1, 2, 3, 4, 5, 6]  
print("With list:", random.sample(list1, 3)) 
  
# Prints list of random items of 
# length 4 from the given string.  
string = "GeeksforGeeks"
print("With string:", random.sample(string, 4)) 
  
# Prints list of random items of 
# length 4 from the given tuple. 
tuple1 = ("ankit", "geeks", "computer", "science", 
                   "portal", "scientist", "btech") 
print("With tuple:", random.sample(tuple1, 4)) 
  
  
# Prints list of random items of 
# length 3 from the given set. 
set1 = {"a", "b", "c", "d", "e"} 
print("With set:", random.sample(set1, 3)) 
```
:::

```mermaid
sequenceDiagram
    participant Alice
    participant Bob
    Alice->>John: Hello John, how are you?
    loop Healthcheck
        John->>John: Fight against hypochondria
    end
    Note right of John: Rational thoughts <br/>prevail!
    John-->>Alice: Great!
    John->>Bob: How about you?
    Bob-->>John: Jolly good!
```

:::Changelog{title="Version 2.1.13"}
::ChangelogItem{type="added" description="Ability to foresee the future"}

::ChangelogItem{type="fixed" description="Bug that took you too far into the past by 2 days"}

::ChangelogItem{type="improved" description="Velocity of time rewind"}

::ChangelogItem{type="broken" description="Broken time forward"}

::ChangelogItem{type="knownIssue" description="You cannot stop time"}
:::

:::hint{type="danger"}
## Danger

By philosophy, the library won't warn you when you modify your past, so you might delete your whole existence.
:::

:::hint{type="success"}
## Year Processing

You can now process years in batches :) glhf
:::

::airtable{url="https://airtable.com/embed/shrLs9hfZvttkCwRq"}

::miro{url="https://miro.com/app/embed/o9J_lU-qYRw=/"}

::figma{url="https://www.figma.com/embed?embed_host=archbee&url=https%3A%2F%2Fwww.figma.com%2Ffile%2Fcw2RcZoZeRW200Jq4fb5cc%2FUntitled%3Fnode-id%3D0%253A1"}

::loom{url="https://www.loom.com/embed/f2d56eab6a304c83a367d7e529948e33"}



::loom{url="https://www.loom.com/embed/818848c7650a44079d3039406de41f4e"}

::githubGist{url="https://gist.github.com/8d50bc3766ccc6aca121e445272b8b8b.js"}

::lucidchart{url="https://app.lucidchart.com/documents/embeddedchart/1fc96c13-eef8-4db5-9d7e-a8a0264af1a7"}

::trello{url="https://trello.com/embed/card?id=oE5Vbjb3"}

::codepen{url="https://codepen.io/dascalescuro/embed/XWeQabM"}

:::DropList
```json
{
  "columns": [
    {
      "id": "1",
      "name": "In progress ",
      "items": [
        {
          "id": "sNMY3cBUTdkbpPC9oB5kQ",
          "content": "Beijing Datacenter"
        }
      ]
    },
    {
      "id": "2",
      "name": "Testing",
      "items": [
        {
          "id": "hXD0rxdo6yBZezZtn2X_b",
          "content": "Germany Datacenter"
        },
        {
          "id": "oQXwQKc6dLABfimotEzn2",
          "content": "SEA Datacenter"
        },
        {
          "id": "3KxqfMAcbNCB8BnfMeZPY",
          "content": "Arctic Datacenter"
        }
      ]
    },
    {
      "id": "3",
      "name": "Done",
      "items": [
        {
          "id": "uDhh7XVY_9wueHq4XOakS",
          "content": "South American Datacenter"
        },
        {
          "id": "sTAIWLsLUaMyLyCNdWzjO",
          "content": "Switzerland Datacenter"
        },
        {
          "id": "qptvf6EiotCqyhHSyvN5J",
          "content": "SF, NY, Brussels Datacenters"
        }
      ]
    }
  ]
}
```
:::

:::Map
```json
{
  "zoom": 2,
  "center": [
    3.370856476926319,
    -5.887577533721924
  ],
  "markerPositions": [
    [
      39.9676482528045,
      -122.84431457519533
    ],
    [
      35.79108281624994,
      96.98043823242188
    ],
    [
      39.63953756436671,
      -116.54296875
    ],
    [
      38.82259097617713,
      -120.41015625
    ],
    [
      32.54681317351517,
      113.02734375
    ],
    [
      47.27922900257085,
      3.1640625000000004
    ],
    [
      16.29905101458183,
      103.0078125
    ],
    [
      38.82259097617713,
      -79.80468750000001
    ],
    [
      27.68352808378776,
      -81.38671875000001
    ],
    [
      -7.362466865535738,
      -55.01953125000001
    ],
    [
      31.353636941500987,
      115.48828125
    ],
    [
      14.944784875088372,
      -117.0703125
    ],
    [
      48.69096039092552,
      18.984375000000004
    ],
    [
      31.653381399664,
      95.625
    ],
    [
      33.637489243170826,
      -473.87329101562506
    ]
  ]
}
```
:::

[Realtime Editor with Markdown Shortcuts](docId\:x_04MEQiLWW4yMHOOMc80)&#x20;

# The End

