aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

EMR Serverless - [BUG]: Updating tags on EMR Serverless Application requires app to be stopped

Open
#2,370 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::EMRServerless::Application

### Resource Name

_No response_

### Issue Description

When using CDK to update tags on an AWS::EMRServerless::Application resource, the CloudFormation deployment fails if the application is in a STARTED state.
The error returned is:

Only MaxConcurrentRuns from SchedulerConfiguration can be updated when application is in STARTED state.

This behavior is inconsistent with both:

- The [CloudFormation documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-emrserverless-application.html), which states that Tags updates require No interruption

- The AWS console, which allows adding/removing tags while the application is running (STARTED state)

### Expected Behavior

I expect cdk deploy (CloudFormation update) to succeed when adding/updating/removing tags on an EMR Serverless Application that is in a STARTED state

### Observed Behavior

cdk deploy fails when the application is running.

CloudFormation attempts an UpdateApplication API call, which is rejected.

Deployment only succeeds if I manually STOP the application before running cdk deploy.

Sample CloudTrail event

"eventSource": "emr-serverless.amazonaws.com",
"eventName": "UpdateApplication",
"errorCode": "ValidationException",
"responseElements": {
"message": "Only MaxConcurrentRuns from SchedulerConfiguration can be updated when application is in STARTED state."
}
}

### Test Cases

Minimal CDK example:
```
from aws_cdk import (
App,
Stack,
CfnTag,
aws_emrserverless as emrs
)
from constructs import Construct

class ReproStack(Stack):
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)

emrs.CfnApplication(
self, "App",
name="repro-app",
type="SPARK",
architecture="X86_64",
releaseLabel="emr-7.10.0",
autoStartConfiguration=emrs.CfnApplication.AutoStartConfigurationProperty(enabled=True),
autoStopConfiguration=emrs.CfnApplication.AutoStopConfigurationProperty(enabled=True, idleTimeoutMinutes=15),
maximumCapacity=emrs.CfnApplication.MaximumAllowedResourcesProperty(cpu="10", memory="40", disk="200GB"),
tags=[CfnTag(key="env", value="dev")] # Change this tag and redeploy while app is STARTED -> fails
)

app = App()
ReproStack(app, "EmrServerlessTagRepro")
app.synth()
````

1. Deploy stack with initial tags.
2. Start the EMR Serverless application manually (or set auto-start).
3. Change or add a tag in CDK/CFN and deploy.
4. Observe failure with ValidationException

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the AWS::EMRServerless::Application reproduction and the CloudTrail UpdateApplication event described in the issue. Verify the tag update failure while the application is STARTED, compare it with the documented no-interruption behavior and the console workflow, and consider the deployment successful when tags can be changed without manually stopping the application.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.