Skip to Main Content
Amazon EC2 Cookbook
book

Amazon EC2 Cookbook

by Sekhar Reddy, Aurobindo Sarkar
November 2015
Intermediate to advanced content levelIntermediate to advanced
194 pages
4h 16m
English
Packt Publishing
Content preview from Amazon EC2 Cookbook

Creating IAM roles

An IAM role is a container for a policy. Using IAM roles for EC2 instances allows for easy management of access keys and for their automatic rotation, that is, Amazon rotates the keys several times a day without requiring any specific action from your end. Hence, you should not have the access keys as a part of the AMI or your application, as their rotation becomes unnecessarily complicated. We just need to create an IAM role, assign permissions to the role, and then launch the EC2 instances to make this work.

After creating a role, you will also need to create a policy and assign it to the newly created role. For example, if an EC2 instance needs access to other AWS services, such as S3 buckets or DynamoDB tables, then you can ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Amazon EC2

Programming Amazon EC2

Jurg van Vliet, Flavia Paganelli
AWS SysOps Cookbook - Second Edition

AWS SysOps Cookbook - Second Edition

Eric Z. Beard, Rowan Udell, Lucas Chan

Publisher Resources

ISBN: 9781785280047Supplemental Content