0% found this document useful (0 votes)
42 views35 pages

Lab 2

Here are some tasks you could try: - Configure the AWS CLI and use commands like aws s3 ls to view buckets - Create a new S3 bucket and upload/download objects using the AWS CLI - Enable versioning on a bucket and view previous versions of objects - Delete an object in a versioned bucket and view the delete marker - Set up a lifecycle policy to transition or expire objects after a period - Configure replication between two of your S3 buckets - Research the different S3 storage classes and their pricing models Let me know if any of these tasks or concepts need more explanation! Practicing with your own AWS account will help solidify your understanding.

Uploaded by

casapedisertatie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views35 pages

Lab 2

Here are some tasks you could try: - Configure the AWS CLI and use commands like aws s3 ls to view buckets - Create a new S3 bucket and upload/download objects using the AWS CLI - Enable versioning on a bucket and view previous versions of objects - Delete an object in a versioned bucket and view the delete marker - Set up a lifecycle policy to transition or expire objects after a period - Configure replication between two of your S3 buckets - Research the different S3 storage classes and their pricing models Let me know if any of these tasks or concepts need more explanation! Practicing with your own AWS account will help solidify your understanding.

Uploaded by

casapedisertatie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Amazon Web Services

How to configure AWS CLI


1. go to https://www.awseducate.com/signin/SiteLogin and
enter your email and password from the amazon’s email.
2. Click on AWS Account and then on AWS Educate Starter
Account
How to configure AWS CLI
• click on Account Details button

• click on Show button


How to configure AWS CLI
• copy everything from the blue rectangle to
C:\Users\yourusername\.aws\credentials
How to configure AWS CLI
• If you don’t have \.aws\credentials file please
create them manually, or open a Command
Prompt and type aws configure, then press
enter for each field.
• In normal environment you can do like this:
https://docs.aws.amazon.com/cli/latest/usergui
de/cli-chap-configure.html
How to configure AWS CLI
• Your \.aws\credentials file should look like this:

• open a Command Prompt and type “aws s3 ls”.


This command will display all the buckets from
your s3.
S3 – AWS CLI basic commands
• You can download your bucket thus:
aws s3 sync s3://<source_bucket>
<local_destination>
Example:
aws s3 sync s3://mybucket .
S3 – AWS CLI basic commands
• You can sync your bucket thus:
aws s3 sync <local_destination> s3://<source_bucket>
Example:
aws s3 sync . s3://mybucket

If you have local files, after synchronization all of


them will be uploaded into the bucket
S3 – AWS CLI basic commands
• You can create a new bucket thus:
aws s3 mb s3://bucket-name

• You can delete a bucket that contains files thus:


aws s3 rb s3://bucket-name --force
Task
• download locally one bucket using AWS CLI

• create a bucket, add 2 files into it and upload it


into s3 using AWS CLI

• display all buckets using AWS CLI

• after you see the new bucket delete the bucket


using AWS CLI
Versioning
• Versioning is a means of keeping multiple variants of an object in the same bucket.

• You can enable versioning by clicking on the bucket, then click on properties and
then click on Enable versioning, then click on Save button.
Versioning
If you uploaded a new version of an object(eg. one file) you can press Show button
in order to see all the object’s version.
Delete Markers
• A delete marker is a placeholder (marker) for a versioned
object that was named in a simple DELETE request. Because
the object was in a versioning-enabled bucket, the object was
not deleted. The delete marker, however, makes Amazon S3
behave as if it had been deleted.
• A delete marker has a key name (or key) and version ID like
any other object.
Delete Markers
• You can delete a file from a bucket thus: click on Hide, select
the file, click on More, click on Delete.
Delete Markers
• Click on Delete.
Delete Markers
Click on Show. It can be seen that text.txt has a delete marker
associated. If you delete the marker the file will be restored.
If you want to completely delete the file you have to delete all
versions that are associated with the file.
Object Lifecycle Management
• To manage your objects so that they are stored cost
effectively throughout their lifecycle, we can
configure their Amazon S3 Lifecycle. There are two
types of actions:
– Transition actions—Define when objects transition to
another storage class storage class. There are costs
associated with the lifecycle transition requests.
– Expiration actions—Define when objects expire.
Amazon S3 deletes expired objects on your behalf. The
lifecycle expiration costs depend on when you choose to
expire objects
Object Lifecycle Management
You can add a lifecycle rule thus: click on your
bucket, then click on Management, then click on
Lifecycle, then click on “Add lifecycle rule”.
Object Lifecycle Management
Enter the rule name and chose the scope. You
can apply the rule to all objects or to all objects
from a prefix. Click on “Apply to all objects in the
bucket, then click Next.
Object Lifecycle Management
Chose Previous versions, then click Next.
Object Lifecycle Management
You can chose after how many days to delete
the previous versions of the objects, then click
on Next button.
Object Lifecycle Management
Click on Save button.
AWS S3 Replication
Amazon S3 Replication enables automatic, asynchronous
copying of objects across Amazon S3 buckets. With Amazon S3
Replication, you can configure Amazon S3 to automatically
replicate S3 objects across different AWS Regions by using
Amazon S3 Cross-Region Replication (CRR) or between buckets in
the same AWS Region by using Amazon S3 Same-Region
Replication (SRR).
It can be used in order to have a back-up for your bucket.
AWS S3 Replication
You can add a replication rule thus: click on your
bucket, then click on Management, then click on
Replication, then click on “Add rule”
AWS S3 Replication
Click on entire bucket, then click on Next button
AWS S3 Replication
Chose the destination bucket and then click on
Next button. Both buckets should have
versioning enabled.
AWS S3 Replication
Chose Create new role, a rule name, then click
on Next.
AWS S3 Replication
Click on Save button.
Storage classes
• Amazon S3 offers a range of storage classes designed for
different use cases.
• These include:
– S3 Standard for general-purpose storage of frequently
accessed data;
– S3 Intelligent-Tiering for data with unknown or changing
access patterns;
– S3 One Zone-Infrequent Access (S3 One Zone-IA) for long-lived,
but less frequently accessed data;
– Amazon S3 Glacier (S3 Glacier) and Amazon S3 Glacier Deep
Archive (S3 Glacier Deep Archive) for long-term archive and
digital preservation.
Storage classes - Performance
Storage classes - Performance
AWS Pricing
• You pay for storing objects in your S3 buckets.

• The rate you’re charged depends on your


objects' size, how long you stored the objects
during the month, and the storage class
AWS Pricing
AWS Pricing
Task
• Try to implement into your AWS account the
concepts from this presentation.

You might also like