A Practical Guide to AWS IAM
$6.99
Minimum price
$9.99
Suggested price

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

Authors have earned$10,072,521writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

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

See full terms

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), EPUB (for phones and tablets) and MOBI (for 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. It really is that easy.

Learn more about writing on Leanpub