DEV Community

Cover image for Securing Your Data in AWS : A Practical Guide
Deepa Baskaran
Deepa Baskaran

Posted on • Updated on

Securing Your Data in AWS : A Practical Guide

Introduction
In the modern cloud computing landscape, data security is non-negotiable. AWS provides a suite of powerful tools to help ensure your data is protected. As part of our recent workshop, we covered the multi-layered approach to securing your AWS workloads. Our team focused on "Securing Your Workload," and my specific analysis was on "Secure Your Data" part.

In this blog, I’ll provide a concise overview of the key methods for securing your data, supplemented by video clips demonstrating each step. Additionally, I’ll weave in some interesting facts and insights to enhance your understanding.

Securing Data in AWS
Securing data in AWS involves implementing measures to protect it from unauthorized access and potential breaches. AWS offers several services and best practices to enhance data security, including encryption, access control, and activity monitoring.
Below are a few securing methods dealt in this blog. Check out the video clips attached for detailed step-by-step guides on each topic.

  1. Prevent Public Access to Private S3 Buckets
  2. Enable CloudTrail Data Events for S3 Buckets with Sensitive Data
  3. Encrypt Amazon EBS Volumes
  4. Encrypt Amazon RDS Databases
  5. Require HTTPS for All Public Web Endpoints

1. Prevent Public Access to Private S3 Buckets
Amazon S3 buckets often contain sensitive data that should not be publicly accessible. Ensuring your S3 buckets are private involves:
Configuring bucket policies and access control lists (ACLs) to restrict access.
Enabling Block Public Access settings at the account and bucket level to prevent accidental exposure.
Did you know? Amazon Macie uses machine learning to automatically discover, classify, and protect sensitive data stored in S3.

https://drive.google.com/file/d/1_SVuR8Y2iN8bZeW4JK3t5R-nGwvIdoUp/view?usp=drive_link

2. Enable CloudTrail Data Events for S3 Buckets with Sensitive Data
Amazon CloudTrail allows you to monitor API calls made to your AWS resources. For S3 buckets containing sensitive data, enabling CloudTrail Data Events ensures:
Detailed logging of all read and write operations.
Improved visibility and the ability to track unauthorized access attempts.
AWS CloudTrail logs every single API call made in your AWS account, providing comprehensive visibility into user activity.

https://drive.google.com/file/d/1SigJeBa7jA9l5H21QZ5nmcn5FSVMzwJc/view?usp=drive_link

3. Encrypt Amazon EBS Volumes
Encryption of EBS volumes is crucial for protecting data at rest. Here are three approaches to encrypting EBS volumes:

a. Create an Instance with Encrypted EBS
When launching a new EC2 instance, you can opt to encrypt the EBS volumes:

Go to the EC2 dashboard.
Start the process to launch a new instance.
In the "Add Storage" step, enable encryption for the EBS volume.
Did you know? You can use AWS Key Management Service (KMS) to create and manage your encryption keys for EBS volumes. It's a secure and flexible way to handle your encryption needs.

https://drive.google.com/file/d/1EuAHuCxK4GnnfWe3QK5zvQWosS02_GlB/view?usp=drive_link

b. Enable Encryption for EBS in an Existing Instance
For existing instances, you can enable encryption without data loss:
Create a snapshot of the unencrypted volume.
Use the snapshot to create a new encrypted volume.
You can also detach the old volume and attach the new encrypted volume.
AWS allows you to encrypt EBS volumes with minimal performance impact, ensuring your applications run smoothly even with encrypted volumes.

https://drive.google.com/file/d/1BCEStOUejtSjjliYmr2Xmia7VIZ2qHy7/view?usp=drive_link

c. Create an Encrypted Volume and Attach it to EC2
To add encrypted volumes to an existing instance:
Create a new volume from the EBS dashboard and ensure encryption is enabled.
Attach the encrypted volume to your EC2 instance.
Once an EBS volume is encrypted, it cannot be decrypted. Encryption is a one-way process.

https://drive.google.com/file/d/12QEn-VaJ28F3gKXUGdfSjLmwG1-Lln-x/view?usp=drive_link

4. Encrypt Amazon RDS Databases (Video clip to be updated)
RDS provides managed database services with built-in encryption capabilities:

Enable encryption when creating an RDS instance to ensure all data stored in the database is encrypted at rest.
Use the AWS Management Console or CLI to enable encryption for existing databases by creating a snapshot and restoring it to a new, encrypted instance.
Amazon RDS encryption uses the AES-256 encryption algorithm to secure data, one of the most secure encryption standards available.

5. Require HTTPS for All Public Web Endpoints
To protect data in transit, it’s crucial to enforce HTTPS for all public-facing endpoints:
Configure your web applications and APIs to use HTTPS.
Use AWS Certificate Manager (ACM) to manage SSL/TLS certificates easily.
Using HTTPS not only secures your data in transit but also improves your website’s search engine ranking, as search engines like Google prioritize secure sites.

Conclusion
Securing data in AWS involves a multi-faceted approach, leveraging various AWS services and best practices. By implementing these measures, you can significantly enhance the security of your data, ensuring it remains protected from unauthorized access and breaches. Happy securing!

Note : Here is the link to an insightful article on "Securing your infrastructure" by my team member Ms.Hemalatha Ramanujam https://dev.to/hrmnjm.
This was a part of the Security Baseline workshop we worked together.
https://dev.to/hrmnjm/securing-the-aws-infrastructure-4n58

References :
https://catalog.workshops.aws/startup-security-baseline/en-US
https://aws.amazon.com/macie/
https://aws.amazon.com/cloudtrail/
https://aws.amazon.com/kms/
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Encryption.html

Top comments (0)