Hello All,
I have a step function that calls a JIRA Create Issue REST API which is registered in the API gateway. The JIRA API requires an Authentication token to be passed as an Header.
However, when I invoke the API from the Step function, I am unable to pass the Authorization token to the Endpoint request header. Since the parameter "Authorization" is not allowed in the Step function, I had to provide a different parameter name.
I can see that, from CloudWatch logs, that the Authorization header is being passed to the Method request, but I am not able to map it to the Integration request.
Step function Definition:
{
"Comment": "Call the JIRA API",
"StartAt": "Call Create Issue JIRA",
"States": {
"Call Create Issue JIRA": {
"Type": "Task",
"Resource": "arn:aws:states:::apigateway:invoke",
"InputPath": "$",
"Parameters": {
"ApiEndpoint": "1biic9mt41.execute-api.ap-south-1.amazonaws.com",
"Method": "POST",
"Stage": "stage",
"Path": "createissue",
"Headers": {
"AuthCode": ["Basic <Authcode encoded in base64>"]
},
"AuthType": "IAM_ROLE",
"RequestBody.$": "$"
},
"End": true
}
}
I have created the "AuthCode" in the HTTP header in Method Request of the API and mapped the same in the HTTP header section of the Integration request.
I could not see the HTTP header in the Endpoint request headers section.
I am new to this and learning as I go, so any help is appreciated on how to achieve this