Getting UnknownOperationException while using AWS service catalog API

0

We are trying to build custom application to integrate with AWS service catalog. When trying to hit that endpoint with Postman, but keep getting an error- com.amazon.coral.service#UnknownOperationException .? The error and postman configs are as follows:

Postman Config: Post: https://servicecatalog.us-east-1.amazonaws.com/

Authorization: AWS Signature AccessKey: <AK> SecretKey: <SK> AWS Region: <region> Service Name: servicecatalog

Headers:

X-Amz-Target:AWSServiceCatalog.ListPortfolios Content-Type:application/json ( tried with application/x-amz-json-1.1)

Response: Response code- 200

{"Output":{"__type":"com.amazon.coral.service#UnknownOperationException","message":null},"Version":"1.0"}

1개 답변
1

if you are writing code with Python, maybe this will be helpful

import boto3

def list_portfolios():
    # Create a service catalog client
    sc = boto3.client('servicecatalog')

    # Call the list_portfolios method
    response = sc.list_portfolios()

    # Print the portfolio details
    for portfolio_detail in response['PortfolioDetails']:
        print(portfolio_detail)

# Call the function
list_portfolios()

but if you want to call via HTTP request, you need to correct Authorization value in the header, it uses AWS Signing key, not AWS Access Key or Secret Key

profile picture
답변함 4달 전
  • Thank you for your response. We are using Postman to simulate REST API call and using AWS authentication method to sign request where in it generate sign key based on key/secreat before calling AWS service catalog rest API. We can trigger EC2 rest API with same method but issue comes with service catalog API, is there anything we are missing here?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠