Page 3 of 24

Adding SSL with Certbot

Note: This is primarily for me to remember doing these steps, If it benefits someone else then great =).

In this example I will be listing out the steps to install SSL on https://crowdslike.com

Step 1

We will need to SSH into our machine. In our case its an EC2 instance.

 Step 2

Installing Certbot. Head over to their documentation to get the instructions. They may vary depending on your machines operating system. We will be installing certbot-auto. 

Step 3

We will need to stop our server. In our case we are running NGINX.

 Step 4

Here we will run the certbot command to generate our new certificate. The command will ask you a few questions along the way.

If you see the congratulations message then you have made it. Now we will need to copy these two lines for later usage.

 Step 5

Now, we will update our NGINX config and add SSL support. Below is a simple config setup.

We need to restart our NGINX sever.

 Step 6

Let’s setup auto-renewal of our certificate. Certbot certificates last 30 days. The cron will run every night at 1 am.

To check that the cronjob was saved, you can run the command below.

 

Medium Post – AWS CodeDeploy Multiple Environments Shell Scripts

medium-logo

I will occasionally write posts on medium, check out the latest one.
AWS CodeDeploy Multiple Environments Shell Scripts

Query data stored in an S3 bucket with AWS Athena

glue-athena

Note: I’m assuming that you’re an IAM user with admin access.

 Adding some data to an S3 bucket.

The data format we will be using for this example is a CSV. Below is a sample of the data and how it’s structured, nothing complicated.

Our bucket path will be:

 Creating a table and schema in AWS Athena

Head over to the Athena dashboard and lets create a new table manually. We will be going through the creation wizard. I will provide screenshots along the way. Note that we will also be creating a database along with our table. See step 1.

Lets kick things off.

Screen Shot 2018-03-08 at 5.42.14 PM

Step: 1

Screen Shot 2018-03-08 at 5.53.46 PM

Step: 2
Since we are working with CSV files we select the appropriate date format.

Screen Shot 2018-03-08 at 10.08.08 PM
Step: 3
This is were we define our schema for our data. The screenshot below gets cut off but just add all four columns and all of type string.

Screen Shot 2018-03-08 at 10.37.58 PM

Step: 4
Don’t worry about add partition section, this is a whole other topic to discuss. For now just click on create table.

Screen Shot 2018-03-08 at 10.41.03 PM

 

© 2019 Aldomatic

Theme by Anders NorenUp ↑