| Server IP : 52.25.153.185 / Your IP : 216.73.217.117 Web Server : Apache System : Linux ip-172-26-6-158 5.10.0-45-cloud-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64 User : daemon ( 1) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/awscli/examples/codecommit/ |
Upload File : |
**To get the base-64 encoded contents of a file in an AWS CodeCommit repository**
The following ``get-file`` example demonstrates how to get the base-64 encoded contents of a file named ``README.md`` from a branch named ``master`` in a repository named ``MyDemoRepo``. ::
aws codecommit get-file --repository-name MyDemoRepo --commit-specifier master --file-path README.md
Output::
{
"blobId":"559b44fEXAMPLE",
"commitId":"c5709475EXAMPLE",
"fileContent":"IyBQaHVzEXAMPLE",
"filePath":"README.md",
"fileMode":"NORMAL",
"fileSize":1563
}
For more information, see `GetFile`_ in the *AWS CodeCommit API Reference* guide.
.. _`GetFile`: https://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetFile.html