Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
AWS Security Cookbook

You're reading from   AWS Security Cookbook Practical solutions for securing AWS cloud infrastructure with essential services and best practices

Arrow left icon
Product type Paperback
Published in Oct 2024
Last Updated in Feb 2025
Publisher Packt
ISBN-13 9781835081891
Length 428 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
 Kanikathottu Kanikathottu
Author Profile Icon Kanikathottu
Kanikathottu
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Chapter 1: Setting Up AWS Accounts and Organization 2. Chapter 2: Access Management with IAM Policies and Roles FREE CHAPTER 3. Chapter 3: Key Management with KMS and CloudHSM 4. Chapter 4: Securing Data on S3 with Policies and Techniques 5. Chapter 5: Network and EC2 Security with VPCs 6. Chapter 6: Web Security Using Certificates, CDNs, and Firewalls 7. Chapter 7: Monitoring with CloudWatch, CloudTrail, and Config 8. Chapter 8: Compliance with GuardDuty, Macie, Inspector, and Analyzer 9. Chapter 9: Advanced Identity and Directory Management 10. Chapter 10: Additional Services and Practices for AWS Security 11. Index 12. Other Books You May Enjoy

Using key policies with conditional keys

In this recipe, we will learn how to use key policies, especially with conditions. Resource-based policies for KMS keys are called key policies. When managing access to KMS resources, we can use key policies alone, or we can use IAM policies and grants along with key policies. Unlike other resource-based policies such as bucket policies, which are not mandatory, key policies are mandatory to manage and use keys. When a key is created, a default key policy is created by AWS, as we saw in the Creating keys in KMS recipe.

Getting ready

We’ll need the following to complete this recipe:

  • A working AWS account, awsseccb-sandbox-1, and a user, awsseccbadmin1, as described in the Technical requirements section.
  • An S3 bucket created in the us-east-1 region. I will use a bucket called awssecuritykmsbucket.

How to do it...

We can demonstrate the use of key policies with condition keys as follows:

  1. Create a key with...
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
AWS Security Cookbook
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon