Categories
AWS Java SQL

Backup AWS MySQL, mount the backup locally and explore with SQuirreL

In this tutorial, we will backup an AWS RDS MySQL database as a dump, then we will mount the dump locally using a MySQL Testcontainers. Finally, we will explore the local backup content and schema, using SQuirreL. 1) Backup the AWS MySQL database We need an EC2 instance that has access to the database. For […]

Categories
AWS Docker Java

AWS Elastic BeanStalk + Spring boot + Hibernate + MySQL

In this tutorial, we explain how to build a docker image that contains a Java Spring Boot REST API and JPA Hibernate ORM, to connect to an AWS RDS MySQL database. 1) Get started You can use our previous tutorial that explains how to use Spring Boot with Hibernate. The only things we will add […]

Categories
AWS Java

Fast delete all the objects in a S3 bucket with Java AWS SDK

In this article, we explain how to fast delete all the objects in a given AWS S3 bucket. We will use batch deletes with the Java AWS SDK. 1) Java AWS SDK dependency First, we need to add the Java AWS dependency to our pom.xml: 2) Gather all the S3 objects keys in the bucket […]

Categories
AWS Bash Linux SQL

Connect MySQL client with private AWS RDS database, from EC2 instance

How to use the MySQL client command line interface with a private AWS RDS MySQL database. Let’s suppose we already have an EC2 instance, with an app that communicates with the database. For instance, the EC2 instance could be part of an Elastic Beanstalk environment (please see here how to setup a private AWS RDS […]

Categories
AWS Bash Linux

SSH to AWS EC2 instance in 2 minutes

How to SSH to an AWS EC2 instance in 2 minutes. We automate most of the process using a bash script, jq and the AWS CLI. 1) Open SSH traffic to the EC2 instance Log into the AWS console and go to the EC2 instances section. Then click on blue Instance ID link of the […]

Categories
AWS SQL

Connect to AWS RDS MySQL from Elastic Beanstalk

In this article, we explain how to connect to a decoupled AWS RDS MySQL database from an AWS Elastic Beanstalk Docker environment. We will add the RDS security group to the Elastic Beanstalk environment. 1) Create the AWS RDS database Log into the AWS console, got to the RDS section, and click on the orange […]

Categories
AWS

AWS certificate manager: create a SSL certificate for a GoDaddy domain

How to create a SSL certificate for a GoDaddy domain, using AWS certificate manager. The process is pretty simple: 1) Create a random SSL certificate with AWS certificate manager which is a Certificate Authority (CA) 2) Add the CNAME DNS verification values given by AWS certificate manager to your domain in GoDaddy 3) Wait for […]

Categories
AWS Bash

Deploy a docker image from AWS ECR registry to Elastic Beanstalk in 2 minutes

In this tutorial, we will see how to deploy a docker image that is stored in AWS ECR registry to AWS Elastic Beanstalk. We will use automated scripts using the AWS CLI. 0) Prerequisites You need AWS CLI installed on your machine. Follow this tutorial to do it in 30 seconds. Also you need a […]

Categories
AWS Bash

Install the latest AWS CLI v2 on Ubuntu, in 2 minutes

To install the latest version of AWS CLI v2 on your Ubuntu machine, open a terminal and run: cd ~/Downloads curl “https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip” -o “awscliv2.zip” unzip awscliv2.zip sudo ./aws/install To check that everything went well, run: $ aws –version aws-cli/2.2.42 Python/3.8.8 Linux/5.4.0-87-generic exe/x86_64.ubuntu.18 prompt/off We can see that the aws-cli version 2.2.42 is now installed ! […]