Notes and anecdotes

Techstuff rambling

Boto3 – copying and creating files + cloudfront invalidations

A 1-2-3 on Python3 boto3 package with my most common operations

Adding a python API handler with serverless

Create an AWS Lambda function with Python3 and integrate with S3? Simple if you know how (though getting there is a bitch, I bet Amazon does this on purpose as a way to trick developers in on their certification-ride). I found how, copy-paste below.

AWS S3 and CloudFront workshop

Last week, I held an AWS workshop on how to host a (dummy) React app there, in S3 and with CloudFront. If you’d like to learn what I taught the others, a github repo is available at https://github.com/tomfa/aws-frontend-workshop.

Getting started with Hubot + Slack

If Custom Slash commands weren’t enough for you, or if you are trapped behind a firewall without the option to make public endpoints, bots are a great way to make custom integrations with Slack. Anything you can program is doable to integrate with Slack, let me show you and get you started.

Custom Slack slash commands (on Heroku)

Imagine writing “/info web” in your Slack and receiving latency, percentage 4xx, 5xx errors from your webserver directly through Slack. Or “/app web” to receive current deployed version and last deploy timestamp. Or “/analytics web” to receive most popular URLs or number of visits. Well that’s perfectly doable!

Elastic Beanstalk with Terraform

If you haven’t already, try to add the Beanstalk application in your environment using only the eb command (see own post). What we do there, is making sure you have the correct setup for vpc and subnets. Once you’ve made sure that is OK, you can come here and try creating the application using terraform. That has…

Continue Reading

Elastic Beanstalk – In a VPC

“The EC2 instances failed to communicate with AWS Elastic Beanstalk”. FUDGE! Notes on how to successfully launch a Beanstalk instance in a VPC.

HTTPS for AWS CloudFront and AWS ELB

Wow, such easy, much free! A few simple steps on 1) How to obtain a certificate for your domain, and 2) how to use it on your CloudFront or Elastic Load Balancer.

Using AWS Route 53 and SES to handle DNS and e-mail

Some notes on using AWS for handling DNS and e-mail.

Build screen bootup

I have a “stupid computer” whos job is only to show a build screen. Its a debian, and I’d like for it to automatically reload the build page every 5 minutes, as well as enter the build screen in case of a reboot. Here’s one way to do it.

Jellybeans

Create Elastic Beanstalk app with Java 8

Beanstalk is quite nice. And the awsebcli looks nice too, along with its documentation and the example guide at pypi. You can deploy straight from a local git repo in one command. You can have each branch go to a separate Beanstalk environments. So I tested it, and here are my notes: Edit: If you want to learn this,…

Continue Reading

AWS Elastic Beanstalk

“By using Elastic Beanstalk, developers can focus on developing their application and are freed from deployment-oriented tasks, such as provisioning servers, setting up load balancing, or managing scaling.” – AWS. Here’s a few general notes on what AWS Elastic Beanstalk (or just Beanstalk) is, pricing etc.

Send AWS EC2 logs to Slack

I have a Java app that runs on an regular Linux (EC2) instance, and logs to some folder on that machine. What I want is for Slack to be notified if any error occurs in the logs. This is possible through CloudWatch in almost all regions. Let me show you how!

Send AWS CloudWatch Alarms to Slack

I have a few servers on AWS. Some information on those, e.g. high load, would be nice to be notified of. Preferably on Slack. How do I do that?

Add S3 bucket + CloudFront using Terraform (example)

Case: I have some frontend app that consists of static files, e.g. a React app packed with WebPack. I want to deploy it to S3, with CloudFront in front of it. (Optional) I also want index.html to be rendered when other paths are requested (such as /food/cake-is-best), and for the site to return 200 status instead of 404.

AWS CodePipeline

CodePipeline is a specification of how your code runs out to production. What it does is connecting source code with a builder (optional) and a deployment platform. For example, you can set it to trigger a deploy to AWS Beanstalk when a Github repository is updated. And with its 1$ / month, it’s practically free to use. However, CodePipeline is…

Continue Reading

Adding Freshdesk to Slack

Adding slack as an app in Freshdesk allows you to use observers and dispatcher in freshdesk to notify / recieve data from Slack. First, add Slack as an app to Freshdesk Login to your Freshdesk Click Admin > Apps > Get more apps Search for slack Add it to your team and channel Add an…

Continue Reading

Startup workflow toolkit

In my imagined startup, everything is running so smooth. You don’t need to check anything, you just develop, create, work and do. Anything you should know, comes to you automatically – automated input; and any task that can be automated, is – automated output. You’re not the computer – the computer is. Automated input 1. I need…

Continue Reading

Set index.html as default file on S3 bucket

aws s3 website $MY_BUCKET_NAME –index-document index.html

How to add hubot to slack

Simple notes on how to install hubot and add it to Slack

1 2