When you create a role in IAM using console, AWS automatically creates a EC2 instance profile with the same name and associates the role with the instance profile. Remember, the names may be same but instance profile and IAM role are two different things.
When you use CLI or SDK API to create IAM Role, you have to create a Instance profile separately, with a name of your choice.
You select EC2 instance profile (not a role) from a list of existing profiles to launch a EC2 (you don’t choose IAM roles)
An instance profile can contain only one IAM role, although a role can be included in multiple instance profiles.
EC2 Security
RSA 2048 SSH-2 public/private key pairs are used (don’t confuse these keys with data encryption keys such as the ones provided by S3 or those saved in KMS)
Public key(s) are stored in AWS and used when launching an EC2 instance. Corresponding private key must be saved and protected by you.
Linux uses public key in the EC2 and SSH client needs private key to SSH
Windows: Private key used by console to decrypt admin password
EBS Security
EBS volumes are stored redundantly in the same AZ
Can be optionally encrypted using AES-256
Data is encrypted/decrypted as it moves between EC2 instance and EBS storage
Create Snapshot does not encrypt if source volume is not encrypted
Create AMI does not encrypt if source EC2 has unencrypted volumes.
Snapshots and AMIs can be encrypted (check box) while copying from unencrypted snapshots or AMIs.
ELB uses TLS
CloudTrail logs are encrypted by default and stored in S3 buckets
CloudFront No encryption
You create Origin Access Identities in CF and associate these with your distributions
Supports signed URLs to control who can access content
S3
At rest optionally uses SSE and client libraries to encrypt data
In flight uses SSL
Glacier
At rest automatically uses AES-256 to encrypt data
In flight uses SSL
Storage gateway
Asynchronous transfer from on premise software appliance to S3
At rest automatically uses AES-256 to encrypt data and store in S3
In flight uses SSL
DynamoDB: Fine grain security at row and column level.Encryption at rest can be enabled only when you are creating a new DynamoDB table. After encryption at rest is enabled, it can’t be disabled. Uses AWS KMS for key.
RDS
RDS Security Groups (different from EC2 security groups)
In flight uses SSL
Optional encryptionat rest for all database engines supported
Redshift
database user permissions are allowed per cluster basis (not per table basis)
uses 4 tier key based architecture to encrypt data using AES-256 at rest
database key
data encryption keys
cluster key
master key
Elasticache
uses “Cache security groups” to control access to cache clusters
SQS
Data is NOT automatically encrypted
User can encrypt data before sending to SQS and consumer needs decrypt
SNS
topic owners can set permission on topics and control who can publish/subscribe these topics
EMR
Uses two EC2 security groups one for master nodes and another for slave nodes
Input data can be encrypted before uploading to S3
You will need to add a decryption step to the beginning of your job flow when EMR fetches data from S3