Search code examples
amazon-web-servicescurlaws-code-deploy

How to call aws codedeploy endpoints using curl


I'm trying to list all deployments from aws codedeploy. There's an aws codedeploy API here: http://docs.aws.amazon.com/codedeploy/latest/APIReference/API_ListDeployments.html but I'm still not sure how I would go about getting a response via curl.

I've tried this so far and it doesn't work:

echo $(curl -s 'https://ID_GOES_HERE.execute-api.LOCATION_GOES_HERE.amazonaws.com/ListDeployments')

EDIT: I was able to get what I wanted to achieve by using boto3 for my python script. I was originally planning to use requests:http to basically use GET calls but it seems like boto3 takes care of this for me.


Solution

  • Are you putting ID and Location in curl command ?Above mentioned command dont have id and location.

    Also optionally you can try following CLI command to List the deployments in a deployment group for an application registered with the applicable IAM user or AWS account.

    list-deployments
    [--application-name <value>]
    [--deployment-group-name <value>]
    [--include-only-statuses <value>]
    [--create-time-range <value>]
    [--cli-input-json <value>]
    [--starting-token <value>]
    [--max-items <value>]
    [--generate-cli-skeleton <value>]