- Considering our Fargate Container has the hole to access the and execute AWS Services. We can use following code to access the Different Services.
- Remember The role of Fargate container is different from Build and Deployment creator role so the role of tools like Code Build,EC2 Image Builder may be different than role of Fargate container. The role of Fargate container or any other container in which our JVM is running and executing code matters here.
private AWSStepFunctions awsStepfunctions; awsStepfunctions = AWSStepFunctionsClientBuilder.standard().build(); //Step Function Parameters JSONObject sfnInput = new JSONObject(); sfnInput.put("NAME", dataSetup.getname()); sfnInput.put("F_DATE", parsedfdate); sfnInput.put("T_DATE", parsedtdate); if (!StringUtils.hasLength(arn)) { arn = this.awsStateMachineArn; } try { StartExecutionRequest executionRequest = new StartExecutionRequest().withStateMachineArn(arn) .withInput(sfnInput.toString()); StartExecutionResult result = this.awsStepfunctions.startExecution(executionRequest); log.info("Response from Execution " + arn + "=====>" + result.toString()); } catch (Exception e) { log.info(e.toString()); }
sdf
No comments:
Post a Comment