AWS infrastructure:

How to use AWS educate

A classroom is created on AWS educate is created and an invitation is sent to your email address. Follow the steps to create an account and enroll to the class.

Everytime that you need to practice and execute labs, just follow these steps

Go to your classroom

Once logged in, on top menu bar click on myClassroom.

AWS Educate home page

Find the class you enrolled and click on the blue button of Go to classroom

AWS Educate classroom list

Go to your AWS console

Once in the class room, click on AWS Console to go to the AWS console. Bear in mind that it is not your AWS account and could have some limitations.

AWS educate classrooms

Connect to a private subnet

Here we have an architecture of a two-tier application in which there is a public subnet with an instance running your web server which also has a public IP and a private subnet with an instance running your DB server and is not reachable from outside. Private and Pubic subnets

To connect to the instances in the private subnets, we use a special instance called bastion host. To more about them, refer to AWS documentation.

Here we take a simpler approach and we use the WS instance which is publicly accessible as a "bastion host" to connect to the DB instance. In order to connect to the DB instance in the private subnet,

  1. Copy the private key associated to the DB instance to WS instance
  2. Connect to the WS instance
  3. From the WS instance, connect to the DB instance

Assume that

  • both machines are running Ubuntu instances
  • the private key associated to WS instance is called ws-private-key.pem
  • the private key associated to DB instance is called db-private-key.pem

                                local-user@local-machine:~$ scp -i /path/to/ws-private-key.pem /path/to/db-private-key.pem ubuntu@ws-ip:/home/ubuntu/
                                local-user@local-machine:~$ ssh -i /path/to/ws-private-key.pem ubuntu@ws-ip
                                ubuntu@ws-ip:~$ ssh -i /home/ubuntu/db-private-key.pem ubuntu@db-ip

Hosting static website on Amazon S3

It is a fast, convenient and cost effective approach to host your static website on Amazon S3.

A tutorial on AWS Kinesis Firehose delivery stream

In this tutorial, we're trying to implement a data ingestion stream using an EC2 instance as the source producing messages using AWS Kinesis agent and a S3 bucket as the destination.

The architecture of the implementation is drawn in the following diagram: Kinesis Firehose tutorial diagram

Here are links to the material used in this tutorial:

And here is the configuration put in /etc/aws-kinesis/agent.json

                                    "firehose.endpoint": "",
                                    "flows": [
                                            "filePattern": "/tmp/stop_times.csv",
                                            "deliveryStream": "kinesis-demo-fh-stream"

and here is the commands to prepare data for Kinesis agent

                                curl -o
                                head -n 10 stop_times.txt
                                sed '1d' stop_times.txt > stop_times_without_header.csv
                                touch /tmp/stop_times.csv
                                head -n 10 stop_times_without_header.csv >> /tmp/stop_times.csv