A Practical Guide to AWS IAM

Retired

This book is no longer available for sale.

A Practical Guide to AWS IAM

How to Write Policies, Control Access, and Secure an AWS Account

About the Book

Given a task to make a security incident in an AWS account less likely and less impactful, an expert configures tighter access control. This book shows you the tools to do just that.

IAM is a complicated service, there is no sugarcoating that. There are tons of configuration options and each service integrates with it differently. Nobody knows all the quirks and exceptions, and every situation requires a lot of experimentation.

I remember when I started out with AWS I felt it was an obstacle, making everything a lot harder than necessary. Everything was hidden behind some technical jargon and it wasn't intuitive at all where to configure things. Then its JSON policy structure required a lot of searching for solutions. IAM was in my way whatever I wanted to do.

It was much later when I become interested in security and that was when I realized how essential IAM is to secure an AWS account. There are a lot of other services for security, such as Config, Security Hub, CloudTrail, and GuardDuty, but they all play a secondary role. The security of an account lies in the configuration of IAM.

After a bit of learning, I started to see the underlying logic behind all those obscure terminology that felt so distant at first. The identities, the types and structure of the policies all fit into a bigger picture that defines the security posture of an account.

This book focuses on what is common in setting up access control in AWS: not how to fine-tune permissions for an S3 bucket but how resource-based policies work, which are used in S3, KMS, and several other services. Similarly, instead of detailing all the available condition keys, you'll learn where to find them and how to use them in the policy language.

Unfortunately, there is no magic formula that works in all situations. So this book does what I believe is the next best thing: it shows how IAM and its components work so you'll be able to better decide on a solution for your security-related tasks. You'll learn what is common so that you'll have an easier time figuring out the solutions for specific problems.

This book helps you to:

* Set up users and roles in an efficient way

* Write IAM policies

* Reason about what a given policy does

* Implement tighter access control

About the Author

Tamás Sallai
Tamás Sallai

Given a task that requires writing software, an expert provides better and more reliable solutions. I write articles and books to help you be that expert.

I'm a software developer focusing mostly on cloud computing and web technologies. I'm especially interested in how to handle edge cases to end up with dependable software. One of my main focus is security and how each part affects the whole system.

I co-author the advancedweb.hu blog where I've published more than a hundred technical articles.

Table of Contents

  • Introduction
    • Structure of this book
  • Access control basics
    • Where IAM controls access
    • Access elements
      • Principal
        • IAM Users
        • IAM Roles
        • Special Principals
      • Resource
      • Action
      • Metadata
    • CloudTrail logging
  • IAM Policies
    • Structure
      • Filters
        • Principal/NotPrincipal
        • Resource/NotResource
        • Action/NotAction
        • Condition
          • Strings
          • IfExists
          • Variables
          • Multiple values
          • Other types
    • Policy types
      • Identity-based policies
        • Inline and managed policies
      • Resource-based policies
      • Service Control Policy (SCP)
      • Session policy
      • Permissions boundary
    • Visual editor
  • Evaluation flow
    • Step 1: Build the request context
    • Step 2: Collect all applicable policies
    • Step 3: Run the evaluation logic
  • Evaluation examples
    • Identity policies to allow access
    • Resource policy to deny access
      • Resource policy to allow access
    • Using conditions
      • Tag-based access control
    • Restricted resources
  • How to secure an AWS account
    • Security as an AWS administrator
      • Do not reuse credentials
      • Minimize the number of policies
      • Use separate accounts via Organizations
      • Implement least privilege
      • Minimize transitive permissions
      • Use monitoring and logging
    • Security as a developer
      • Follow an additive permission strategy
      • Use roles instead of users where possible
      • Maintain an identical test environment
      • Automate security checks
  • Conclusion
  • Glossary
  • About the author

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub