Skip to Content
test
0 %
Cleanup before you leave
Details
// Explore More Tutorials

Cleanup before you leave

12/03/2018

Understand the element to cleanup or stop before you leave or pause

You will learn

  • How to stop or terminate your SAP HANA, express edition
  • How to cleanup your Amazon Athena content

Step 1: Amazon User

When creating your Amazon User in Set up your AWS environment, you had to create a new user in IAM and downloaded the the Access key ID and Secret access key.

Amazon IAM

Make sure that you backup this file by for example sending this to yourself via an email.

Then delete the local copy of the file.

Log on to answer question
Step 2: EC2 Instance Key Pair

When creating your SAP HANA, express edition, you had to :

  • create a key pair (the pem file):
Amazon Web Services Marketplace
  • convert it into a ppk private key file
Amazon Web Services Marketplace

Make sure that you backup this file by for example sending this to yourself via an email.

Then delete the local copy of the file.

Log on to answer question
Step 3: SAP HANA, express edition Instance

When using the SAP HANA, express edition AMI from AWS, you will be charged for both the EC2 instance and the provisioned EBS volumes used by this instance.

Therefore, even if you stop your EC2 instance running your SAP HANA, express edition instance, you will still be charged for the provisioned EBS volumes.

Only detaching and deleting the EBS volumes will prevent that but your SAP HANA, express edition will no longer be usable.

Therefore it is recommended that you terminate your SAP HANA, express edition instance when you won’t need to use it anymore or for a while.

To do so, access the EC2 Dashboard.

Click on 1 Running Instances.

Amazon Web Services EC2 Dashboard

Right click on the running instance, then select Instance State > Terminate.

Amazon Web Services EC2 Dashboard

You will be notified that with EBS backed instance, the default action is for the root EBS volume to be deleted when the instance is terminated.

However, SAP HANA, express edition AMI uses EBS volumes which do not have Delete on Termination set to true will persist after this instance is terminated which may incur an EBS cost.

Click on Yes, Terminate.

Amazon Web Services EC2 Dashboard

After a few seconds the instance will be marked as terminated.

Amazon Web Services EC2 Dashboard

Go to the EC2 Dashboard - Volumes.

Amazon Web Services EC2 Dashboard

By default, your SAP HANA, express edition uses 2 disks, as displayed below.

Amazon Web Services EC2 Dashboard

But after the termination of the instance, one will be automatically deleted but not the other.

Please note down, what capacity (in GiB) the remainder disk is as this will be part of the validation below.

Select the Volume associated to your SAP HANA, express edition EC2 instance, then use the Actions > Delete Volumes menu.

Amazon Web Services EC2 Dashboard

Provide an answer to the question below then click on Validate.

Your SAP HANA, express edition instance uses 2 volumes. what was the capacity of the largest on (in GiB) ?
×
Step 4: Amazon Athena

In order to avoid being charged, you will now drop the Amazon Athena content.

Access the Athena Query Editor.

Paste the following SQL statement then click on Run query:

drop database gdelt_athena cascade

Provide an answer to the question below then click on Validate.

After executing the drop query, what result text is displayed.
×
Step 5: Amazon S3

Now let’s clean the S3 buckets.

Access the S3 Management Console.

Select the sap-hana-athena-<my unique id> bucket created earlier.

Click on Delete Bucket.

Amazon Web Services S3 Dashboard

You will be prompted to type (or paste) the bucket name to confirm your action then click on Confirm.

Amazon Web Services S3 Dashboard

Repeat the operation for all buckets where the name include athena like the ones with names starting aws-athena-query-results.

Log on to answer question

Congratulations! You have just completed your mission: combine the power of SAP HANA, express edition with Amazon Athena!

Next Steps

Back to top