applications
Creates, updates, deletes, gets or lists an applications resource.
Overview
| Name | applications |
| Type | Resource |
| Id | aws.emr_serverless.applications |
Fields
The following fields are returned by SELECT queries:
- get_application
- list_applications
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the application. (pattern: <code>[A-Za-z0-9._/#-]+</code>) |
application_id | string | The ID of the application. (pattern: <code>[0-9a-z]+</code>) |
architecture | string | The CPU architecture of an application. (ARM64, X86_64) |
arn | string | The ARN of the application. (pattern: <code>arn:(aws[a-zA-Z0-9-]*):emr-serverless:.+:(\d{12}):/applications/[0-9a-zA-Z]+</code>) |
auto_start_configuration | object | The configuration for an application to automatically start on job submission. |
auto_stop_configuration | object | The configuration for an application to automatically stop after a certain amount of time being idle. |
created_at | string (date-time) | The date and time when the application run was created. |
disk_encryption_configuration | object | The configuration object that allows encrypting local disks. |
identity_center_configuration | object | The IAM Identity Center configuration applied to enable trusted identity propagation. |
image_configuration | object | The applied image configuration. |
initial_capacity | object | The initial capacity of the application. |
interactive_configuration | object | The configuration to use to enable the different types of interactive use cases in an application. |
job_level_cost_allocation_configuration | object | The configuration object that enables job level cost allocation. |
maximum_capacity | object | The maximum allowed cumulative resources for an application. No new resources will be created once the limit is hit. |
monitoring_configuration | object | The configuration setting for monitoring. |
network_configuration | object | The network configuration for customer VPC connectivity. |
release_label | string | The Amazon EMR release associated with the application. (pattern: <code>[A-Za-z0-9._/-]+</code>) |
runtime_configuration | array | The Configuration specifications of an application. Each configuration consists of a classification and properties. You use this parameter when creating or updating an application. To see the runtimeConfiguration object of an application, run the GetApplication API operation. |
scheduler_configuration | object | The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above. |
state | string | The state of the application. (CREATING, CREATED, STARTING, STARTED, STOPPING, STOPPED, TERMINATED) |
state_details | string | The state details of the application. (pattern: <code>.\S.</code>) |
tags | object | The tags assigned to the application. |
type_ | string | The type of application, such as Spark or Hive. |
updated_at | string (date-time) | The date and time when the application run was last updated. |
worker_type_specifications | object | The specification applied to each worker type. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the application. (pattern: <code>[0-9a-z]+</code>) |
name | string | The name of the application. (pattern: <code>[A-Za-z0-9._/#-]+</code>) |
architecture | string | The CPU architecture of an application. (ARM64, X86_64) |
arn | string | The ARN of the application. (pattern: <code>arn:(aws[a-zA-Z0-9-]*):emr-serverless:.+:(\d{12}):/applications/[0-9a-zA-Z]+</code>) |
created_at | string (date-time) | The date and time when the application was created. |
release_label | string | The Amazon EMR release associated with the application. (pattern: <code>[A-Za-z0-9._/-]+</code>) |
state | string | The state of the application. (CREATING, CREATED, STARTING, STARTED, STOPPING, STOPPED, TERMINATED) |
state_details | string | The state details of the application. (pattern: <code>.\S.</code>) |
type_ | string | The type of application, such as Spark or Hive. |
updated_at | string (date-time) | The date and time when the application was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_application | select | application_id, region | Displays detailed information about a specified application. | |
list_applications | select | region | nextToken, maxResults, states | Lists applications based on a set of parameters. |
create_application | insert | region, releaseLabel, type, clientToken | Creates an application. | |
update_application | update | application_id, region, clientToken | Updates a specified application. An application has to be in a stopped or created state in order to be updated. | |
delete_application | delete | application_id, region | Deletes an application. An application has to be in a stopped or created state in order to be deleted. | |
cancel_job_run | exec | application_id, job_run_id, region | shutdownGracePeriodInSeconds | Cancels a job run. |
start_job_run | exec | application_id, region, clientToken, executionRoleArn | Starts a job run. | |
start_session | exec | application_id, region, clientToken, executionRoleArn | Creates and starts a new session on the specified application. The application must be in the STARTED state or have AutoStart enabled, and have interactive sessions enabled. This operation is supported for EMR release 7.13.0 and later. | |
start_application | exec | application_id, region | Starts a specified application and initializes initial capacity if configured. | |
stop_application | exec | application_id, region | Stops a specified application and releases initial capacity if configured. All scheduled and running jobs must be completed or cancelled before stopping an application. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The ID of the application to stop. |
job_run_id | string | The ID of the job run to cancel. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of applications that can be listed. |
nextToken | string | The token for the next set of application results. |
shutdownGracePeriodInSeconds | integer | The duration in seconds to wait before forcefully terminating the job after cancellation is requested. |
states | array | An optional filter for application states. Note that if this filter contains multiple states, the resulting list will be grouped by the state. |
SELECT examples
- get_application
- list_applications
Displays detailed information about a specified application.
SELECT
name,
application_id,
architecture,
arn,
auto_start_configuration,
auto_stop_configuration,
created_at,
disk_encryption_configuration,
identity_center_configuration,
image_configuration,
initial_capacity,
interactive_configuration,
job_level_cost_allocation_configuration,
maximum_capacity,
monitoring_configuration,
network_configuration,
release_label,
runtime_configuration,
scheduler_configuration,
state,
state_details,
tags,
type_,
updated_at,
worker_type_specifications
FROM aws.emr_serverless.applications
WHERE application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists applications based on a set of parameters.
SELECT
id,
name,
architecture,
arn,
created_at,
release_label,
state,
state_details,
type_,
updated_at
FROM aws.emr_serverless.applications
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND states = '{{ states }}'
;
INSERT examples
- create_application
- Manifest
Creates an application.
INSERT INTO aws.emr_serverless.applications (
name,
releaseLabel,
type,
clientToken,
initialCapacity,
maximumCapacity,
tags,
autoStartConfiguration,
autoStopConfiguration,
networkConfiguration,
architecture,
imageConfiguration,
workerTypeSpecifications,
runtimeConfiguration,
monitoringConfiguration,
diskEncryptionConfiguration,
interactiveConfiguration,
schedulerConfiguration,
identityCenterConfiguration,
jobLevelCostAllocationConfiguration,
region
)
SELECT
'{{ name }}',
'{{ releaseLabel }}' /* required */,
'{{ type }}' /* required */,
'{{ clientToken }}' /* required */,
'{{ initialCapacity }}',
'{{ maximumCapacity }}',
'{{ tags }}',
'{{ autoStartConfiguration }}',
'{{ autoStopConfiguration }}',
'{{ networkConfiguration }}',
'{{ architecture }}',
'{{ imageConfiguration }}',
'{{ workerTypeSpecifications }}',
'{{ runtimeConfiguration }}',
'{{ monitoringConfiguration }}',
'{{ diskEncryptionConfiguration }}',
'{{ interactiveConfiguration }}',
'{{ schedulerConfiguration }}',
'{{ identityCenterConfiguration }}',
'{{ jobLevelCostAllocationConfiguration }}',
'{{ region }}'
RETURNING
name,
application_id,
arn
;
# Description fields are for documentation purposes
- name: applications
props:
- name: region
value: "{{ region }}"
description: Required parameter for the applications resource.
- name: name
value: "{{ name }}"
- name: releaseLabel
value: "{{ releaseLabel }}"
- name: type
value: "{{ type }}"
- name: clientToken
value: "{{ clientToken }}"
- name: initialCapacity
value: "{{ initialCapacity }}"
- name: maximumCapacity
description: |
The maximum allowed cumulative resources for an application. No new resources will be created once the limit is hit.
value:
cpu: "{{ cpu }}"
memory: "{{ memory }}"
disk: "{{ disk }}"
- name: tags
value: "{{ tags }}"
- name: autoStartConfiguration
description: |
The configuration for an application to automatically start on job submission.
value:
enabled: {{ enabled }}
- name: autoStopConfiguration
description: |
The configuration for an application to automatically stop after a certain amount of time being idle.
value:
enabled: {{ enabled }}
idleTimeoutMinutes: {{ idleTimeoutMinutes }}
- name: networkConfiguration
description: |
The network configuration for customer VPC connectivity.
value:
subnetIds:
- "{{ subnetIds }}"
securityGroupIds:
- "{{ securityGroupIds }}"
- name: architecture
value: "{{ architecture }}"
valid_values: ['ARM64', 'X86_64']
- name: imageConfiguration
description: |
The image configuration.
value:
imageUri: "{{ imageUri }}"
applicationLevelDigestResolution: {{ applicationLevelDigestResolution }}
- name: workerTypeSpecifications
value: "{{ workerTypeSpecifications }}"
- name: runtimeConfiguration
value:
- classification: "{{ classification }}"
properties_: "{{ properties_ }}"
configurations: "{{ configurations }}"
- name: monitoringConfiguration
description: |
The configuration setting for monitoring.
value:
s3MonitoringConfiguration:
logUri: "{{ logUri }}"
encryptionKeyArn: "{{ encryptionKeyArn }}"
managedPersistenceMonitoringConfiguration:
enabled: {{ enabled }}
encryptionKeyArn: "{{ encryptionKeyArn }}"
cloudWatchLoggingConfiguration:
enabled: {{ enabled }}
logGroupName: "{{ logGroupName }}"
logStreamNamePrefix: "{{ logStreamNamePrefix }}"
encryptionKeyArn: "{{ encryptionKeyArn }}"
logTypes: "{{ logTypes }}"
prometheusMonitoringConfiguration:
remoteWriteUrl: "{{ remoteWriteUrl }}"
- name: diskEncryptionConfiguration
description: |
The configuration object that allows encrypting local disks.
value:
encryptionContext: "{{ encryptionContext }}"
encryptionKeyArn: "{{ encryptionKeyArn }}"
- name: interactiveConfiguration
description: |
The configuration to use to enable the different types of interactive use cases in an application.
value:
studioEnabled: {{ studioEnabled }}
livyEndpointEnabled: {{ livyEndpointEnabled }}
sessionEnabled: {{ sessionEnabled }}
- name: schedulerConfiguration
description: |
The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.
value:
queueTimeoutMinutes: {{ queueTimeoutMinutes }}
maxConcurrentRuns: {{ maxConcurrentRuns }}
- name: identityCenterConfiguration
description: |
The IAM Identity Center Configuration accepts the Identity Center instance parameter required to enable trusted identity propagation. This configuration allows identity propagation between integrated services and the Identity Center instance.
value:
identityCenterInstanceArn: "{{ identityCenterInstanceArn }}"
userBackgroundSessionsEnabled: {{ userBackgroundSessionsEnabled }}
- name: jobLevelCostAllocationConfiguration
description: |
The configuration object that enables job level cost allocation.
value:
enabled: {{ enabled }}
UPDATE examples
- update_application
Updates a specified application. An application has to be in a stopped or created state in order to be updated.
UPDATE aws.emr_serverless.applications
SET
clientToken = '{{ clientToken }}',
initialCapacity = '{{ initialCapacity }}',
maximumCapacity = '{{ maximumCapacity }}',
autoStartConfiguration = '{{ autoStartConfiguration }}',
autoStopConfiguration = '{{ autoStopConfiguration }}',
networkConfiguration = '{{ networkConfiguration }}',
architecture = '{{ architecture }}',
imageConfiguration = '{{ imageConfiguration }}',
workerTypeSpecifications = '{{ workerTypeSpecifications }}',
interactiveConfiguration = '{{ interactiveConfiguration }}',
releaseLabel = '{{ releaseLabel }}',
runtimeConfiguration = '{{ runtimeConfiguration }}',
monitoringConfiguration = '{{ monitoringConfiguration }}',
diskEncryptionConfiguration = '{{ diskEncryptionConfiguration }}',
schedulerConfiguration = '{{ schedulerConfiguration }}',
identityCenterConfiguration = '{{ identityCenterConfiguration }}',
jobLevelCostAllocationConfiguration = '{{ jobLevelCostAllocationConfiguration }}'
WHERE
application_id = '{{ application_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}' --required
RETURNING
application;
DELETE examples
- delete_application
Deletes an application. An application has to be in a stopped or created state in order to be deleted.
DELETE FROM aws.emr_serverless.applications
WHERE application_id = '{{ application_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- cancel_job_run
- start_job_run
- start_session
- start_application
- stop_application
Cancels a job run.
EXEC aws.emr_serverless.applications.cancel_job_run
@application_id='{{ application_id }}' --required,
@job_run_id='{{ job_run_id }}' --required,
@region='{{ region }}' --required,
@shutdownGracePeriodInSeconds='{{ shutdownGracePeriodInSeconds }}'
;
Starts a job run.
EXEC aws.emr_serverless.applications.start_job_run
@application_id='{{ application_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"clientToken": "{{ clientToken }}",
"executionRoleArn": "{{ executionRoleArn }}",
"executionIamPolicy": "{{ executionIamPolicy }}",
"jobDriver": "{{ jobDriver }}",
"configurationOverrides": "{{ configurationOverrides }}",
"tags": "{{ tags }}",
"executionTimeoutMinutes": {{ executionTimeoutMinutes }},
"name": "{{ name }}",
"mode": "{{ mode }}",
"retryPolicy": "{{ retryPolicy }}"
}'
;
Creates and starts a new session on the specified application. The application must be in the STARTED state or have AutoStart enabled, and have interactive sessions enabled. This operation is supported for EMR release 7.13.0 and later.
EXEC aws.emr_serverless.applications.start_session
@application_id='{{ application_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"clientToken": "{{ clientToken }}",
"executionRoleArn": "{{ executionRoleArn }}",
"configurationOverrides": "{{ configurationOverrides }}",
"tags": "{{ tags }}",
"idleTimeoutMinutes": {{ idleTimeoutMinutes }},
"name": "{{ name }}"
}'
;
Starts a specified application and initializes initial capacity if configured.
EXEC aws.emr_serverless.applications.start_application
@application_id='{{ application_id }}' --required,
@region='{{ region }}' --required
;
Stops a specified application and releases initial capacity if configured. All scheduled and running jobs must be completed or cancelled before stopping an application.
EXEC aws.emr_serverless.applications.stop_application
@application_id='{{ application_id }}' --required,
@region='{{ region }}' --required
;