I have created a Integration Request, I am trying to add headers to that request using AWS cloudshell:
aws apigateway update-integration --rest-api-id abcdefgh --resource-id abcdefghj --http-method POST --request-parameters {"integration.request.header.X-mobile":"context.authorizer.mobile"}
But it is not working, I have tried PUT integration as well, It was giving the below error:
An error occurred (BadRequestException) when calling the PutIntegration operation: Enumeration value for HttpMethod must be non-empty
Try add those command options:
--integration-typeeg. AWS_PROXY--integration-methodeg. POST--integration-urieg. arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${LambdaForSimpleProxy.Arn}/invocationsHere you will find values exmple: Lambda Proxy
I had similar issue in cloudformation, when you are using integration some options are conditional AWS::ApiGateway::Method Integration
Unfortunately aws cli docs doesn't mention this.