Monday, June 10, 2019

HowTo - View the system logs of AWS EC2

HowTo - View the system logs of AWS EC2




Be it as Infrastructure as Code or from AWS Console or any, there are times when EC2 Instances failed to get launch or gets terminated, were in, the logs couldnt be accessed for analysis/debugging

What do we do? In spite of very much in visibility, I just realized that 'Get System Logs' is my rescue remedy

Let us see how I used it...

Click on the server which needs debugging as below:


See the logs and perform analysis from 'Get System Logs' screen/view


Thursday, June 6, 2019

AWS Encrypt Root Volumes by Default

AWS Encrypt Root Volumes



We might have used and launched root volumes as part of EC2/EMR for umpteen times in our devops lifecycle. Until few weeks back, I have been encrypting in conventional way as below

  1. Create basic EC2 with required root volume size
  2. Created snapshot from the root volume, of the launched EC2
  3. Copy snapshot with an encryption key
  4. Use this newly copied snapshot, going forward
  5. Or, create an AMI with encrypted root volume, by selecting the just encrypted & created snapshot and use them ahead
Hooooooooooo, lots of work isnt it? I agree :-). It is not about creating AMI or using the encrypted volumes, but it is about doing the clean up of snapshots that were created as above

Monday, June 3, 2019

IAM Access Keys

IAM Access Keys





Users in AWS are listed under AWS -> IAM -> Users

While creating Users, by default, a set of Access Keys are provisioned for the user just created. This can be viewed in from the Users -> Security Credentials tab

But the point to be noted here is that if we are rotating the keys as per the security compliance guidelines, we cannot generate more than two. On trying to create access keys, while two of them already exists we get the below error


If you observe, 'Create Access Keys' is disabled and along with that the maximum limit alert has also been raised