Passing outdated or bad parameters to AWS API calls might lead to inefficient or less secure code. Passing the right parameters will lead to secure or efficient code.
1public void createStepConfigNoncompliant() {
2 // Noncompliant: ActionOnFailure.TERMINATE_JOB_FLOW is outdated.
3 new StepConfig().withName("sampleStepName").withActionOnFailure(ActionOnFailure.TERMINATE_JOB_FLOW);
4}
1public void createStepConfigCompliant() {
2 // Compliant: ActionOnFailure.TERMINATE_CLUSTER is used.
3 new StepConfig().withName("sampleStepName").withActionOnFailure(ActionOnFailure.TERMINATE_CLUSTER);
4}