How to block large files to being pushed to Codecommit

0

I know we can use pre-commit hooks on the client side, but this has limitations (user need to place the hook by himself)

So, my question is how can this be prevented on the server side. More specifically how can push to Codecommit can be blocked if it contains a file > 100MB?

질문됨 일 년 전604회 조회
1개 답변
0

To implement this, you need a server-side pre-receive git hook. Currently, this feature is not supported by AWS CodeCommit. However, there is already a feature request in our backlog, so the service team is aware of that. Unfortunately, I have no further information on when or whether this feature will be released. I encourage you to periodically check the What's New page and look for the announcement.

Until then, you can consider implementing an AWS Lambda function that will be triggered on pushing new code to a CodeCommit repo. This function could check the content of the new commits and take some actions on that, e.g. notify the committer. While it can't prevent such commits from being stored in the repository, you will still have a mechanism to react on pushing large files.

profile pictureAWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠