Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get the raw url of a file in AWS CodeCommit?

In github, you can click the Raw button and you can get the file's url. Does CodeCommit have that feature?

like image 755
Adrian M Avatar asked Nov 20 '25 01:11

Adrian M


2 Answers

Unfortunately and unbelievably, I think the answer is still, NO. The Web UI (AWS Console Code-commit) allows you to navigate to any file, view it, and even edit it, but it doesn't allow you to view the raw (and ultimately) download it. So frustrating. This would be a simple feature for them to add via their GetFile API.

like image 79
successhawk Avatar answered Nov 22 '25 16:11

successhawk


CodeCommit repos are protected by IAM credentials, so you're not going to get a direct public URL to the file.

However, if you want to download the content of a specific file, you can use the AWS SDK or CLI. Here's an example using the CLI:

aws codecommit get-file \
  --repository-name my-project \
  --file-path path/to/file.json \
  --query fileContent \
  --output text \
  | base64 -d
like image 31
Erhhung Avatar answered Nov 22 '25 16:11

Erhhung



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!