CreateApplication - Amazon EMR Serverless

CreateApplication

Creates an application.

Request Syntax

POST /applications HTTP/1.1 Content-type: application/json { "architecture": "string", "autoStartConfiguration": { "enabled": boolean }, "autoStopConfiguration": { "enabled": boolean, "idleTimeoutMinutes": number }, "clientToken": "string", "imageConfiguration": { "imageUri": "string" }, "initialCapacity": { "string" : { "workerConfiguration": { "cpu": "string", "disk": "string", "memory": "string" }, "workerCount": number } }, "maximumCapacity": { "cpu": "string", "disk": "string", "memory": "string" }, "monitoringConfiguration": { "cloudWatchLoggingConfiguration": { "enabled": boolean, "encryptionKeyArn": "string", "logGroupName": "string", "logStreamNamePrefix": "string", "logTypes": { "string" : [ "string" ] } }, "managedPersistenceMonitoringConfiguration": { "enabled": boolean, "encryptionKeyArn": "string" }, "s3MonitoringConfiguration": { "encryptionKeyArn": "string", "logUri": "string" } }, "name": "string", "networkConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "releaseLabel": "string", "runtimeConfiguration": [ { "classification": "string", "configurations": [ "Configuration" ], "properties": { "string" : "string" } } ], "tags": { "string" : "string" }, "type": "string", "workerTypeSpecifications": { "string" : { "imageConfiguration": { "imageUri": "string" } } } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

architecture

The CPU architecture of an application.

Type: String

Valid Values: ARM64 | X86_64

Required: No

autoStartConfiguration

The configuration for an application to automatically start on job submission.

Type: AutoStartConfig object

Required: No

autoStopConfiguration

The configuration for an application to automatically stop after a certain amount of time being idle.

Type: AutoStopConfig object

Required: No

clientToken

The client idempotency token of the application to create. Its value must be unique for each request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9._-]+$

Required: Yes

imageConfiguration

The image configuration for all worker types. You can either set this parameter or imageConfiguration for each worker type in workerTypeSpecifications.

Type: ImageConfigurationInput object

Required: No

initialCapacity

The capacity to initialize when the application is created.

Type: String to InitialCapacityConfig object map

Map Entries: Minimum number of 0 items. Maximum number of 10 items.

Key Length Constraints: Minimum length of 1. Maximum length of 50.

Key Pattern: ^[a-zA-Z]+[-_]*[a-zA-Z]+$

Required: No

maximumCapacity

The maximum capacity to allocate when the application is created. This is cumulative across all workers at any given point in time, not just when an application is created. No new resources will be created once any one of the defined limits is hit.

Type: MaximumAllowedResources object

Required: No

monitoringConfiguration

The configuration setting for monitoring.

Type: MonitoringConfiguration object

Required: No

name

The name of the application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9._/#-]+$

Required: No

networkConfiguration

The network configuration for customer VPC connectivity.

Type: NetworkConfiguration object

Required: No

releaseLabel

The Amazon EMR release associated with the application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9._/-]+$

Required: Yes

runtimeConfiguration

The Configuration specifications to use when creating an application. Each configuration consists of a classification and properties. This configuration is applied to all the job runs submitted under the application.

Type: Array of Configuration objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

Required: No

tags

The tags assigned to the application.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 200 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^[A-Za-z0-9 /_.:=+@-]+$

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: ^[A-Za-z0-9 /_.:=+@-]*$

Required: No

type

The type of application you want to start, such as Spark or Hive.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: Yes

workerTypeSpecifications

The key-value pairs that specify worker type to WorkerTypeSpecificationInput. This parameter must contain all valid worker types for a Spark or Hive application. Valid worker types include Driver and Executor for Spark applications and HiveDriver and TezTask for Hive applications. You can either set image details in this parameter for each worker type, or in imageConfiguration for all worker types.

Type: String to WorkerTypeSpecificationInput object map

Key Length Constraints: Minimum length of 1. Maximum length of 50.

Key Pattern: ^[a-zA-Z]+[-_]*[a-zA-Z]+$

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "applicationId": "string", "arn": "string", "name": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

applicationId

The output contains the application ID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[0-9a-z]+$

arn

The output contains the ARN of the application.

Type: String

Length Constraints: Minimum length of 60. Maximum length of 1024.

Pattern: ^arn:(aws[a-zA-Z0-9-]*):emr-serverless:.+:(\d{12}):\/applications\/[0-9a-zA-Z]+$

name

The output contains the name of the application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9._/#-]+$

Errors

For information about the errors that are common to all actions, see Common Errors.

ConflictException

The request could not be processed because of conflict in the current state of the resource.

HTTP Status Code: 409

InternalServerException

Request processing failed because of an error or failure with the service.

HTTP Status Code: 500

ResourceNotFoundException

The specified resource was not found.

HTTP Status Code: 404

ValidationException

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: