Auto map Amazon exception into CFN exception to reduce handler exception mapping

Open
#353 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
tooling

Research direction

Start by tracing the generated handler exception-mapping path described in the issue and inspect how AmazonServiceException reaches ProgressEvent.defaultFailureHandler. Determine how automatic throttling mapping should apply across generated resources, then verify that the repeated catch block is no longer required while CloudFormation retry behavior remains intact.

Written by the indexing model from the issue text.

Description

enhancement

Cloudformation will do retry for retriable exception, such as throttling exception. However, it requires each handler to map the exception into CFN throttling error.

We should be able to auto map the exception to reduce the effort for all resource to map it. For example:

...................
         } catch (AmazonServiceException ex) {
             if (RetryUtils.isThrottlingException(ex)) {
                 logger.log(String.format("%s [%s] Create call throttled by downstream service", ResourceModel.TYPE_NAME, model.getAlarmName()));
                 return ProgressEvent.defaultFailureHandler(ex, HandlerErrorCode.Throttling);
             }
..................
}

Dominant language
Java
Stars
30
Forks
48
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws-cloudformation/cloudformation-cli-java-plugin

All issues in aws-cloudformation/cloudformation-cli-java-plugin

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.