Recovering your AMAZON SES SMTP credentials!!

How to recover your Amazon SES smtp credentials:-

Important Note:

Your SMTP password is not the same as your AWS secret access key. Do not attempt to use your AWS credentials to authenticate yourself against the SMTP endpoint. 

There are two ways to generate your SMTP credentials. You can either use the Amazon SES console or you can generate your SMTP credentials from your AWS credentials.

Use the Amazon SES console to generate your SMTP credentials if:

  • You want to get your SMTP credentials using the simplest method.
  • You do not need to automate SMTP credential generation using code or a script.

Generate your SMTP credentials from your AWS credentials if:

  • You have an existing  IAM  user and you want that user to be able to send emails using the Amazon SES SMTP interface.
  • You want to automate SMTP credential generation using code or a script.

 A user’s SMTP username is the same as their AWS Access Key ID, so you just need to generate the SMTP password. 

Here I am doing a Java implementation  that converts an AWS SECRET ACCESS KEY to an Amazon SES SMTP password.

For example:  I am creating a file called “smtp.java”  and in this file I create a class named “smtp” and inside you need to give your AWS SECRET ACCESS KEY 

smtp

You can download this file from here.

You  Need to execute this file as:

ex

This will create a file called “smtp” and you need to execute again as :

sm

And this will prompt your AMAZON SES SMTP PASSWORD 🙂

AWS-ElasticIP-Swapping

Attach and Detach Public IP in AWS

This script is used for detach elastic ip from one server and attach it to the secondary private ip of the other server.

For example:-

We have two servers with same content named “server01” and “server02” with primary and secondary private IP in AWS and each instance have a public IP  (ie. Elastic IP). This two public IP’s are pointed to the DNS.

If “server01” goes down, only you need to detach the elastic IP and attached it to the “server02” to the secondary private IP.

You can find the script in the below link:-

Elastic-IP-Swap