skip to Main Content

Trying to add mapping for an integration to pass the websocket connectionId to my http backend. Below command works fine in cloud shell but fails in AWS CLI on Windows.

aws apigatewayv2 update-integration --integration-id foobar --api-id fooapi --request-parameters 'integration.request.header.connectionId'='context.connectionId'

This is the error message

Error parsing parameter '--request-parameters': Expected: '=', received: ''' for input:
'integration.request.header.connectionId'='context.connectionId'

Does anyone know the right syntax to issue in CLI? I tried escaping and double escaping the single quotes. No luck. Making it double quotes will execute but the intended result (the mapping being created) does not happen

2

Answers


  1. Chosen as BEST ANSWER

    I discovered that simply using double quotes instead of single quotes worked:

    --request-parameters "integration.request.header.connectionId"="context.connectionId"
    

  2. Please Don’t use ' in between of '; you used there four times '.

    you can write this command like this

    --request-parameters 'integration.request.header.connectionId=context.connectionId'
    

    because you are using here argument --request-parameters

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search