Showing posts with label root. Show all posts
Showing posts with label root. Show all posts

Sunday, June 22, 2014

AWS EC2 instance user name

When logging into an EC2 instance using SSH, you may receive an error. You check to make sure you have the right instance name, IP address, PEM key etc. but it still fails. You may be using the incorrect user name. The EC2 instance user names by OS are listed here:

http://alestic.com/2014/01/ec2-ssh-username

For example, ubuntu servers are “ubuntu@” amazon is “ec2-user@” and other ones such as Debian are root@

Wednesday, April 2, 2014

IAM : AWS services not supported and tagging support

I often get the question of which services do not support IAM?  Some services and features do not support IAM and must use the AWS root account credentials:

  • Vulnerability Scanning Coordination Form
  • AWS Workspaces
  • Visibility of all Data Pipelines
  • Specific account management pages, such as account profile, AWS account security credentials, payment methods and management of consolidated billing 
  • AWS DevPay 
  • CloudFront keypair creation

A full list of supported services is here:
http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SpecificProducts.html

This page also provides a great list of IAM resource level permissions support, tagging, and STS.

Tuesday, December 3, 2013

Exanding size of your current EBS root volume

In some cases you may need to increase the size your EC2 instance root volume. Here are the steps to do this:

1. Create a volume from an existing EBS snapshot :
aws ec2 create-volume --snapshot-id snap-YourVolumesSnapshot --size 10 -- availability-zone az-asdf-1a 
2. Stop the instance:
was ec2 stop-instances --instance-id i-YourInstanceId
3. Detach the current volume:
was ec2 detach-volume --volume-id vol-TheSmallDefaultVolume
4. Attach the new volume:
was ec2 attach-volume --volume-id vol-TheLargerVolume --instance-id i- YourInstanceId --device /dev/sda1
5. Log into your bastion host:
ssh -i YourFile.pem ec2-user@10.__.__.__
7. Start the instance:
aws ec2 start-instances --instance-id i-YourInstanceId
8. Check the file system size: (It will still be the smaller size)
df –h

9. Resize the file system to the size of the volume
sudo resize2fs /dev/sda1

10. Check the file system size again:
df –h