Simple storage service Flashcards

1
Q

What is S3 and it’s advantages?

A

S3 manages data as objects rather than in file systems or data block.

You can upload any file type you can think of to S3 like photoes, videos, code, documents, text files etc. It cannot be used to run an operating system or database though.

  • It provides secure, durable, highly scalable object storage.
  • S3 allows you sto store and retrieve any amount of data from anywhere on the web at a very low cost.
  • Amazon S3 is easy to use, with a simple web service interface
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How much can S3 store and how does S3 store files?

A
  1. Unlimited storage
    - The total volume of data and the number of objects you can store is unlimited.
  2. Objects up to 5 TB in size
    - S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 terabytes.
  3. S3 Buckets
    - Stores files in buckets, which is very similar to folders on your computer.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Do your S3 have to be globally unique?

A

Yes, it has to be. All AWS accounts share the S3 namespace. Each S3 bucket name is globally unique.

Meaning you probably can’t name your S3 bucket for test_bucket since this is very likely already taken.

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

How is the S3 URLs structured?

A

Structure:
https://BUCKET-NAME.s3.REGION.amazonaws.com/KEY-NAME

example of an url:
https://acloudguru.s3.us-east-1.amazonaws.com/Ralphie.jpg

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

What HTTP code will you receive if an upload to S3 was succesfull?

A

200

When you upload a file to an S3 bucket, you will receive an HTTP 200 code if the upload was succesful.

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

S3 objects operates of what we call a key-value store. Which elements does this key-value store consist of?

A
  1. The key
    - The name of the object (e.g. Ralphie.jpg)
  2. Version ID
    - Important for storing multiple versions of the same object
  3. Value
    - The data itself, which is made up of a sequence of bytes
  4. Metadata
    - Data about the data you are storing (e.g. content-type and last-modified)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

S3 is a safe place to store files and facilitates availability and durability. How is this achived, and at what percentile is the service availability and durability?

A

The data is spread across multiple devices and facilities to ensure the availability and durability.

  1. Availability
    - The service availability is 99.95% - 99.99% depending on the S3 tier
  2. Durability
    - Designed for 99.999999999% (9 decimals) durability for data stored in S3.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the use case for S3 standard and what does it include?

A
  1. High availability and durability
    - Data is stored redundantly across multiple devices in at least 3 availability zones.
  2. Designed for Frequent Access
    - Perfect for frequently accessed data
  3. Suitable for most workloads
    - The default storage class.
    - Use cases include websites, content distribution, mobile and gaming applications, adn big data analytics.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is lifecycle management in S3?

A

You get to define rules to automatically transition object to a cheaper storage tier or delete objects that are no longer required after a set period of time.

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

What is versioning in S3?

A

With versioning, all versions of an object are stored and can be retrieved, including deleted objects.

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

What are the 3 different ways to secure the data in your S3 bucket?

A
  1. Server-side encryption
    - You can set default encryption on a bucket to encrypt all new objects when they are stored in the bucket
  2. Access control lists (ACLs)
    - Define which AWS accounts or groups are granted accesss and the type of access. You can attach S3 ACLs to individual objects within a bucket.
  3. Bucket policies
    - S3 bucket policies specify what actions are allowed or deined. For instance allow user Alice to PUT but not DELETE objects in the bucket.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does it mean that S3 has a strong read-after-write consistency?

A
  1. After a successful write of a new object (PUT request) or an overwrite of an existing object, any subsequent read request immediately received the latest version of the object.
  2. Strong consistency for list operations, so after a write, you can immediately perform a listing of the objects in a bucket with all changes reflected.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the main difference between Acess control list and Bucket policy when it comes to giving access to your S3 Objects?

A
  1. Object ACLs
    - Object ACLs work on an individual object level. Meaning you control access level on specific individuals.
  2. Bucket policy,
    - Bucket policies work on an entire bucket level. Meaning that all users gets the exact same access levels to the bucket since the access is on the bucket and not the specific individual.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you make buckets public?

A
  • Buckets are private by default: When you create an S3 bucket, it is private by default (including all objects within it). You have to allow public access on both the bucket and its objects in order to make the bucket public.
  • Object ACLs: You can make individual objects public using object ACLs.
  • Bucket policies: You can make entire buckets public using bucket policies.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How would you make an entire bucket public?

A

You would use a bucket policy, since that can make the whole bucket public, and you don’t have to make individual objects public.

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

Can S3 be used to host content?

A

Yes it can, but only static content (meaning it’s not hooked up to a database).

You could for instance host a webpage with movie trailers on S3.

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

What are some advantages of versioning?

A
  1. All versions of an object are stored in S3. This includes all writes and even if you delete an object.
  2. Can be a great backup tool.
  3. It cannot be disabled. Once enabled, versioning cannot be disabled, only suspended.
  4. Lifecycle rules, can be integrated with lifecycle rules.
  5. Support MFS. Can support multi-factor authentication so if people want change or delete stuff they need to authenticate twice.
18
Q

How does deleting and restoring a S3 object work when versioning is enabled?

A

When versioning is enabled you can’t technically delete an object.

When you delete an object with versioning you just add a delete marker to your object, which makes it disappear.

if you want to restore the object, you can delete the delete marker which makes your object visible and accessible again.

19
Q

if your S3 bucket is public are previous versions of objects in the bucket also public?

A

No, it’s not.

It’s only the current version of the objects that are publicly available.

20
Q

What are the use case for S3 Standard-infrequent Access (S3 Standard-IA)

A
  1. You need rapid access
    - Used for data that is accessed less frequently but requires rapid access when needed.
  2. You pay to access the data
    - There is a low per-GB storage price and a per-GB retrieval fee.
  3. Use case
    - Great for long-term storage, backups, and as a data store for disaster recovery files.
  • Has 99.9% availability and 99.999999999% (11 9’s) durability.
21
Q

What is S3 one zone-infrequent access, and it’s use cases?

A

Basically the same as S3 Standard-IA, but is stored redundantly within a single AZ.

  • Costs 20% less than regular S3 Standard-IA
  • Great for long-lived, infrequently accessed, non-critical data
  • Has 99.5% availability and 99.999999999% (11 9’s) durability
22
Q

What is S3 Intelligent-Tiering and its use cases?

A

1.Good if you don’t have a standard access pattern, and sometimes you access your data frequently and sometimes you do it infrequently.

  1. Automatically moves your data to the most cost-effective tier based on how frequently you access each object. This is done with machine learning.
  2. It optimizez cost and had a monthly fee of $0.0025 per 1,000 objects
  • Has 99.99% availability and 99.999999999% (11 9’s) durability.
23
Q

What are Glaciers and the 3 options?

A

Glacier is a storage class that is used for very infrequently accessed data.

  • You pay each time you access your data.
  • It’s used only for archiving data.
  • It’s cheap storage
  • Optimized for data that is very infrequently accessed.
  • Has 99.99% availability and 99.9999999999% (11 9’s) durability

The different options are:
1. Glacier instant retrieval
2. Glacier Flexible retrieval
3. Glacier Deep archive

24
Q

What is the use case for Glacier instant retrieval?

A

Provides long-term data archiving with instant retrieval time for you data.

25
Q

What is the use case for Glacier flexible retrieval

A

ideal storage class for archiving data that does not require immediate access but needs the flexibility to retrieve large sets of data at no cost, such as backup or disaster recovery use cases.

Can be minutes or up to 12 hours.

26
Q

What is the use case for Glacier deep archive.

A

Cheapest storage class and designed for customers that retain data sets for 7-10 years or longer to meet customer needs and regulatory compliance requirements.

The standard retrieval time is 12 hours, and the bulk retrieval time is 48 hours.

27
Q

What is lifecycle management?

A

Lifecycle management automates moving your objects between the different storage tiers, thereby maximizing cost effectiveness.

You can combine this with versioning and move different versions of objects to different storage tiers as well.

28
Q

What is S3 object lock?

A

You can use S3 object lock to store objects using the WORM (Write once, Read many). It can help prevent objects from being deleted or modified for a fixed amount of time indefinitely.

You can use S3 object lock to meet regulatory requirements that require WORM storage, or add an extra layer of protection against object changes and deletion.

29
Q

What are the two S3 object lock modes?

A
  1. Governance mode
    - In governance mode, users can’t overwrite or delete an object version or alter its lock settings unless they have special permissions.

It’s possible for some users to delete the object if necessary, but not all.

  1. Compliance mode
    - In compliance mode a protected object version can’t be overwritten or deleted by any user, including the root user in your AWS account. This includes that the retention mode can’t be changed.
30
Q

What is a retention period?

A

A retention period protects an object version for a fixed amount of time.

When you place a retention period on an object version, S3 stores a timestamp in the object version’s metadata to indicate when the retention period expires.

After the retention period expires, the object version can be overwritten or deleted unless you also placed a legal hold on the object version.

31
Q

What is a legal hold?

A

S3 object lock enables you to place a legal hold on an object version. Like a retention period, a legal hold prevents an object version from being overwritten or deleted.

However a legal hold doesn’t have an associated retention period and remain in effect until removed.

Legal holds can be freely placed and removed by any user who has the:

s3:PutObjectLegalHold

permission.

32
Q

What is Glacier vault lock?

A

S3 glacier vault lock allows you to deploy and enforce compliance controls for individual S3 glacier vaults with a vault lock policy.

You can specify controls, such as WORM, in a vault lock policy and lock the policy from future edits.

Once locked, the policy can no longer be changed.

33
Q

What are the 3 different types of S3 encryption?

A
  1. Encryption in transit (When you send objects to and from your bucket)
    - SSl / TLS
    - HTTPS
  2. Encryption at rest: Server-side encryption (When the object is in S3)
    - SSE-S3: S3-managed keys, using AES 256-bit encryption
    - SSE-KMS: AWS Key management service-managed keys
    - SSE-C customer-provided keys
  3. Encryption at Rest: Client-side encryption
    - You encrypt the files yourself before you upload them to S3.
34
Q

Are S3 object encrypted by default?

A

Yes, they are.

All amazon S3 buckets have encryption configured by default using server-side encryption with Amazon S3 managed keys (SSE-S3).

35
Q

How do you enforce server-side encryption?

A

You include the:

x-amz-server-side-encryption header

in the PUT request.

Your two options are either SSE-S3 - S3 managed keys or SSE-KMS - MKS managed keys.

You can also create a buckey policy that denies any S3 PUT requests that doesn’t include the parameter.

36
Q

What is a S3 prefix?

A

The prefixes are just the folders in the directory.

So if the directory to a file in S3 is:

bucket/folder1/subfolder1/file.jpg

the prefix would be:

/folder1/subfolder1

for instance.

37
Q

How can you optimise S3 performance?

A

The way S3 works is you can get:

  • 3,500 PUT/COPY/POST/DELETE
  • 5,500 GET/HEAD requests

per second per prefix.

Meaning you can get better performance by spreading your read across different prefixes. If you are using 2 prefixes you can achieve 11,000 requests per second instead of 5,500 reads per second.

38
Q

What is the latency on S3?

A

S3 has extremely low latency. You can get the first byte out of S3 within 100-200 milliseconds.

39
Q

When you use Amazons encryption service SSE-KMS there are some limits to S3 performance. What are these limitations?

A
  1. These limitations are region specific, but either it’s 5,500, 10,000 ro 30,000 requests per second.
  2. uploading/downloading counts towards the KMS quota.
  3. YOu cannot request a quota increase for KMS.

So sometimes if you hit the quota limit you might want to use the native encryption instead since it will be much faster.

40
Q

What are multipart uploads, and why use it?

A

When you multipart upload you take one large fiel and split it into parts, and upload those smaller parts at the same time rather than one large file.

  • It’s recommended for files over 100 MB
  • It’s required for files over 5 GB
  • It increases upload efficiency, so the upload happens faster
41
Q

What are S3 Byte-range fetches?

A

If you do byte-range fetches you download a large file by splitting it up smaller parts (byte ranges). So you can say you want download a 5 GB file 1 Gb at the time. It will then split into 5 smaller parts and download those at the same time.

  • It increases download efficiency, so the download happens faster
    -If theres a failure in the download, it’s only for a specific byte range.
42
Q

What is S3 replication and why is it useful?

A
  1. S3 replication is a way to replicate objects from one bucket to another, and it’s very useful for creating backups.
    - Versioning must be enabled on both the source and destination buckets.
  2. Objects in an existing bucket are not replicated automatically.
    - Once replication is turned on, all subsequent updated objects will be replicated automatically.
  3. Delete markert are not replicated by default.
    - Deleting individual versions or delte markers will no be replicated by default, but this can be turned on.
  4. This works across regions as well. So if you need to replicate objects from Japan to Australia you can do that.