Do I still get charge if I stop the Spark Session in AWS Glue Interactive Session Notebook?

0

Do I still get charged if I stop the Spark Session in the AWS Glue Interactive Session Notebook? Still don't understand how AWS Glue Interactive Session Notebook charges me. On the website, it said: "Interactive Sessions is optional, and billing applies only if you use it for interactive ETL code development. AWS charges for Interactive Sessions based on the time the session is active and the number of DPUs. Interactive sessions have configurable idle timeouts. AWS Glue Interactive Sessions require a minimum of 2 DPUs and have a default of 5 DPU. There is a 1-minute minimum billing duration for each provisioned Interactive Session. AWS Glue Studio Job Notebooks provide a built-in interface for Interactive Sessions. AWS does not charge for the Job Notebooks but does charge for the Interactive Sessions they use."

So does it mean that the charging will start at the moment I start the spark session, not charge every time I run a paragraph in the notebook, right? Does it mean that even if I just leave the notebook there, as long as I already start the spark session, I will get charged over time?

What happens if I use %stop_session to stop the spark session? Will I still get charged? Or do I have to stop the whole Notebook?

Also, when I check my freetier bill I see this: "1000000.0 Request are always free per month as part of AWS Free Usage Tier (Global-Catalog-Request)" What does the "request" mean here? Is requests = every time I run the ETL job or what?

asked 4 months ago398 views
1 Answer
0
Accepted Answer

Understanding the Charges

AWS Glue Interactive Sessions charges you based on the time the session is active and the number of Data Processing Units (DPUs) you provision. The billing starts when you start an interactive session and continues until you stop it.

  • Session Start: The billing begins when you start the Spark session using the interactive session.
  • Active Time: You are charged for the time the session is active, including idle time, until the session is stopped.
  • Minimum Billing Duration: There is a minimum billing duration of 1 minute for each provisioned interactive session.
  • Idle Timeout: Configurable idle timeout helps in automatically stopping the session if it remains idle for a specified period, reducing unnecessary charges.

Stopping the Spark Session

Using %stop_session to stop the Spark session in the AWS Glue Interactive Session Notebook will stop the session and thereby stop further charges from accruing for that session. However, if the notebook itself remains active and other sessions are started, those will be billed accordingly.

%stop_session

After executing %stop_session, the active session stops, and you should not incur additional charges for that session.

Requests in AWS Free Usage Tier

The "requests" mentioned in your free tier bill refer to API requests. In the context of AWS Glue:

  • Requests: Typically refer to API calls made to manage or execute Glue jobs, interactive sessions, data catalog requests, etc.
  • Not ETL Runs: They do not correspond to every run of your ETL job. Instead, they represent individual API calls made to the AWS Glue service.

Summary

  1. Charges for Interactive Sessions:
  • Start when you initiate the Spark session.
  • Continue as long as the session is active.
  • Include idle time until the session is explicitly stopped or times out based on the idle timeout configuration.
  1. Stopping Charges:
  • Using %stop_session halts the Spark session and stops further charges.
  • Ensure no other active sessions are running to avoid additional charges.
  1. Free Tier Requests:
  • Refer to API calls made to AWS services.
  • Do not equate to the execution of the entire ETL job but rather the management and interaction with AWS Glue resources.

By managing your Spark sessions carefully and utilizing idle timeouts effectively, you can optimize your costs while using AWS Glue Interactive Sessions.

profile picture
EXPERT
answered 4 months ago
profile picture
EXPERT
reviewed 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions