I have a submodule in my git repository and my directory structure is like,
app
-- folder1
-- folder2
-- submodule @5855
I have deployed
It has been so long since the issue with submodules was found. But aws cannot fix it. So codepipeline cannot send .git directory to codebuild. So we have to invent new bicecles, my fix is this in buildspec.yml pre-build command
rm -rf $PWD/*
git clone --depth 1 https:// -b develop .
git submodule update --init --recursive
AWS hurry up, cuz our team is considering move back to github.