- Newest
- Most votes
- Most comments
To construct the EMR Serverless job URL with the missing EMR Studio information, you can use the GetDashboardForJobRun API operation. This method generates a URL that provides direct access to the job run dashboard, including all necessary Studio information if applicable. Here's how to do it:
-
Call the GetDashboardForJobRun API using the application ID and job run ID from your event data:
aws emr-serverless get-dashboard-for-job-run --application-id <application-id> --job-run-id <job-id>
-
This operation will return a URL that you can use in your notification message. The URL includes all required information to access the job's UI, including Studio details if associated.
-
If you need the Studio ID for other purposes, you can extract it from the returned URL. It's typically the subdomain before .emrstudio-prod in the URL.
This approach is robust as it doesn't require maintaining a mapping between applications and Studios, works even if an application isn't associated with a Studio, and ensures the URL is correct and up-to-date.
Note that the generated URL is valid for one hour. For longer validity, you may need to implement a system to regenerate the URL periodically or on-demand.
Sources
GetDashboardForJobRun - Amazon EMR Serverless
Monitoring EMR Serverless applications and jobs - Amazon EMR
Relevant content
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 4 months ago
Thanks for you answer, i added a function to return the dashboard url : def get_emr_dashboard_url(application_id, job_run_id, region): client = boto3.client('emr-serverless', region_name=region) response = client.get_dashboard_for_job_run( applicationId=application_id, jobRunId=job_run_id ) return response.get('url') ,but when i receive the notification message ihad this when click the url:This URL has already been used the maximum number of times. Please generate a new URL. however i didn't check it just once and i have the job running