AWS Fundamentals: RDS & Aurora Security/RDS Proxy/Elasticache Flashcards

1
Q

How is data encrypted at rest in RDS and Aurora?

A

Data is encrypted on volumes using KMS. Encryption is defined at the time of database launch. If the master database is not encrypted, read replicas cannot be encrypted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you encrypt an already existing unencrypted RDS or Aurora database?

A

You must create a database snapshot of the unencrypted database and then restore it as an encrypted database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is data encrypted in flight in RDS and Aurora?

A

In-flight encryption is enabled by default, using TLS root certificates from AWS for secure communication between clients and the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What methods are available for database authentication in RDS and Aurora?

A

You can authenticate using username and password or IAM roles. IAM roles allow EC2 instances or other AWS services to authenticate without needing a password.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you control network access to an RDS or Aurora database?

A

You can use security groups to control access based on specific ports, IP addresses, or other security groups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Do RDS and Aurora support SSH access?

A

No, SSH access is not available in RDS and Aurora unless you use RDS Custom for Oracle or Microsoft SQL Server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you enable and store audit logs in RDS and Aurora?

A

You can enable audit logs to track queries and database activity. To retain them long-term, you must send them to CloudWatch Logs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why would you use Amazon RDS Proxy instead of directly connecting to an RDS database instance?

A

RDS Proxy helps pool and share database connections, reducing the number of connections to the RDS instance. This improves database efficiency, reduces stress on resources (CPU, RAM), and minimizes open connections and timeouts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does Amazon RDS Proxy handle scaling and availability?

A

RDS Proxy is fully serverless, auto-scaling, and highly available across multiple availability zones (AZs). This helps improve database efficiency and provides up to 66% faster failover in case of RDS database instance failover.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which database engines are supported by Amazon RDS Proxy?

A

RDS Proxy supports MySQL, PostgreSQL, MariaDB, Microsoft SQL Server, and Aurora (for MySQL and PostgreSQL).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the key benefits of using Amazon RDS Proxy for applications?

A

No code changes required: Simply connect to the RDS Proxy instead of the database instance.

Minimized failover time: RDS Proxy reduces failover time by up to 66%.

Enforces IAM authentication: Use IAM for database authentication, and securely store credentials in AWS Secrets Manager.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does Amazon RDS Proxy enhance security?

A

RDS Proxy is never publicly accessible and can only be accessed within your VPC, improving overall security. Additionally, it can enforce IAM authentication for database connections and securely store credentials in AWS Secrets Manager.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Amazon ElastiCache and what is its primary function?

A

Amazon ElastiCache is a managed service that provides Redis and Memcached cache technologies. It is used to reduce database load for read-intensive workloads by caching frequently queried data in memory for low latency access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does Amazon ElastiCache help scale applications?

A

ElastiCache helps scale applications by offloading read queries from the database to the cache, reducing database load and improving performance. It also enables making applications stateless by storing session data in the cache.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the key benefits of using Amazon ElastiCache?

A

Reduced database load: By caching frequent queries, you reduce the number of queries to the database.

Stateless applications: By storing session data in the cache, your application becomes stateless.

Fully managed: AWS handles the maintenance, patching, optimization, configuration, monitoring, failure recovery, and backups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the difference between a cache hit and a cache miss in ElastiCache?

A

Cache Hit: When the requested data is found in the cache, the data is returned directly from the cache.

Cache Miss: When the requested data is not found in the cache, the data is fetched from the database and then stored in the cache for future requests.

17
Q

How does Amazon ElastiCache help manage user sessions?

A

ElastiCache stores session data, allowing the application to retrieve the session state for a user even if the user is redirected to a different instance of the application. This ensures users remain logged in and the application remains stateless.

18
Q

How do Redis and Memcached differ in terms of high availability?

A

Redis: Supports multi-availability zone deployment with auto-failover and read replicas for high availability.

Memcached: Does not support high availability or replication. Data is sharded across multiple nodes, and if a node fails, you might lose cached data.

19
Q

When should you choose Redis over Memcached?

A

Choose Redis if you need high availability with auto-failover, data persistence, and features like sorted sets (e.g., leaderboards).

Choose Memcached if you need a high-performance, simple, in-memory cache with multi-threading for better performance but can tolerate data loss and do not need high availability.

20
Q

Which ElastiCache engine supports IAM authentication?

A

Redis supports IAM authentication for AWS API-level security, allowing you to control access through IAM roles and policies.

21
Q

How does Redis in ElastiCache secure connections?

A

Redis supports Redis AUTH, where you can set a password or token to secure access to the Redis cluster. This provides an additional layer of security beyond security groups.

22
Q

How does Memcached in ElastiCache authenticate clients?

A

Memcached uses SASL-based authentication, which is a more advanced authentication mechanism for securing connections to the cache.

23
Q

Does ElastiCache support in-flight encryption?

A

Yes, ElastiCache supports SSL in-flight encryption to secure data in transit between the client and the cache.

24
Q

What are IAM policies used for in ElastiCache?

A

IAM policies in ElastiCache are used for AWS API-level security. They do not apply to the cache connections themselves, which are instead secured through Redis AUTH, SASL, or security groups.

25
Q

What is Lazy Loading in ElastiCache?

A

Lazy Loading is a caching strategy where data is loaded into the cache only when there is a cache miss. If the data isn’t already in the cache, it is fetched from the database and written to the cache.

26
Q

What is the Write Through caching strategy in ElastiCache?

A

In the Write Through strategy, data is written to both the database and the cache simultaneously whenever there is a write operation, ensuring that the cache is always up to date without stale data.

27
Q

What is a use case for Redis Sorted Sets in ElastiCache?

A

Redis Sorted Sets are useful for applications like real-time gaming leaderboards, where elements (e.g., player scores) are ranked automatically in the correct order as new data is added.

28
Q

How does ElastiCache ensure network-level security?

A

ElastiCache uses security groups to control network access. You can define rules to allow or block access based on IP addresses, ports, and other security group configurations.