Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (5.6k points)

When I try to get filenames from codecommit repo using AWS CLI, and when I use the below command:

aws codecommit get-folder --repository-name reponame --folder-path ""

I'm getting the below output:

{

"commitId": "2915c5a2eab08aeb36facbb1dc78b7f3f6f10873",

"folderPath": "",

"treeId": "0cc6d2dcfa75acd0bceacd446674635d44be0ab7",

"subFolders": [],

"files": [

    {

        "blobId": "8e29296c9119a5c5d839bc3d910b065c5cce0629",

        "absolutePath": "filename.yaml",

        "relativePath": "filename.yaml",

        "fileMode": "NORMAL"

    }

],

"symbolicLinks": [],

"subModules": []

}

Can you help to get the full filename of "filename.yml"?

1 Answer

0 votes
by (12.4k points)
edited by

Add the below line in your code and it should work:

| jq -r '.files[].absolutePath'

and then see

man jg

Do you want to master AWS, then do check out the AWS Course by Intellipaat.

Related questions

+1 vote
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...