Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I include my .aws-sam file in my repository?

Quick question for anyone that is using AWS SAM to deploy their microservices in AWS. Do you include your .aws-sam files into your repositories? Or do you gitignore this directory and sub directories?

like image 975
Matt K Avatar asked Dec 06 '25 01:12

Matt K


2 Answers

No, you should not revision control the .aws-sam folder or its subfolders.

Add them to .gitignore, for example as follows:

# SAM default build folder
.aws-sam/

These folders contain intermediate and output files and will, for example, include Python packages, Node modules and other undesirables. None of these should be committed.

like image 81
jarmod Avatar answered Dec 08 '25 14:12

jarmod


You don't need to include the .aws-sam directory in your repository.

The content of this directory are the artifacts outputted from your sam build command, and can always be recreated.

like image 28
me2resh Avatar answered Dec 08 '25 14:12

me2resh