Troubleshooting Error: 400 Bad Request on AWS TaggingIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } AWS Tag is failing in the "Amazon AWS S3" Pattern with the following error 400. But it is hard to figure out what the error 400 means. Error below: "Exception occurred while executing operation Cloud REST - add response to context. Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Cloud request failed. URL: https://tagging.ap-southeast-2.amazonaws.com/ Status: 400 Response: HttpResponseProxy{HTTP/1.1 400 Bad Request [x-amzn-RequestId: 63d54745-9931-4342-b7a0-fbc2185346d0, Content-Type: application/x-amz-json-1.1, Content-Length: 200, Date: Sun, 30 Aug 2020 08:23:54 GMT, Connection: close] ResponseEntityProxy{[Content-Type: application/x-amz-json-1.1,Content-Length: 200,Chunked: false]}} (script_include:AwsApiCommand; line 114). Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Cloud request failed. URL: https://tagging.ap-southeast-2.amazonaws.com/ Status: 400 Response: HttpResponseProxy{HTTP/1.1 400 Bad Request [x-amzn-RequestId: 63d54745-9931-4342-b7a0-" https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/CommonErrors.htmlhttps://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Orlando, Paris, Quebec Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } 1. Modify line 132, 133 of MID script include: AwsApiCommand below. https://xxxxxx.service-now.com/nav_to.do?uri=ecc_agent_script_include.do?sys_id=8ecd32c2db211300d504788dbf96198c%26sysparm_view=discovery else {responseContent = this.getResponseContent(response);throw new FailureException(ExceptionCode.CLOUD_REQUEST_FAILED, args.getUri, httpStatusCode, "", responseContent);} Update: There was a suggestion that for some issue, they had to create additional variable for it to work. Please test it out. Moving this to Internal for now. ====== 131 } else { //throw new FailureException(ExceptionCode.CLOUD_REQUEST_FAILED, args.getUri, httpStatusCode, "", response); var responseContent2 = this.getResponseContent(response); throw new FailureException(ExceptionCode.CLOUD_REQUEST_FAILED, args.getUri, httpStatusCode, "", responseContent2);136 } 2. After modifying the lines, debug it again and it should now show a bit more helpful error as per the screenshot below.