I have been trying to figure out, how to find s3 URL or s3 object name which is created after the codedeploy deployment with new commit ID.
1 Answer
Here is the aws-cli way to list application revisions and their s3 Location:
aws deploy list-application-revisions --application <your application name>
Example output:
{ "revisionType": "S3",
"s3Location": {
"bucket:" "mybucket",
"key": "mys3objectname",
"bundleType": "zip",
"eTag": "ff1e77d70adaedfd14cecba209811a94"
}
}
To construct an s3 url from this, use:
https://s3-<region>.amazonaws.com/<bucket>/<key>
If you need to find your application name, use:
aws deploy list-applications
3 Comments
Sulaiman
This will bring the current revisions, but I need to the find URL which is created for current commit
Sulaiman
Like I have commited a file with comment "NEW CHANGES" and I have got a commit ID "cbe79a11-da91-412e-9579-b71ae9a11fad", now I want to know which s3 bucket is created for this.
Brian Lund Larsen
Maybe you can describe your workflow more. Codedeploy can deploy from git or a registered revision from S3, since you mention S3 I took it you used s3 as storage for the deployment package.