将文件从CodeCommit部署到S3 [英] Deploy files from CodeCommit to S3

查看:137
本文介绍了将文件从CodeCommit部署到S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将某些放入我的CodeCommit存储库中的文件部署到S3存储桶中。我正在尝试使用仓库上的Lambda触发器来执行此操作。但是,我无法获取提交中更改的文件列表,也无法使用AWS CodeCommit API向CodeCommit请求特定文件。

I want to deploy certain files pushed into my CodeCommit repo into an S3 bucket. I'm attempting to do this with a Lambda trigger on the repo. However, I cannot get a list of files changed in a commit nor request a specific file from CodeCommit using the AWS CodeCommit API.

任何建议将不胜感激!

Any suggestions would be greatly appreciated!

推荐答案

是的,该功能不在CodeCommit API中(但是...我想/希望AWS的某人正在为此工作) 。

Yep, that capability is not in the CodeCommit API (yet... I assume/hope someone at AWS is working on it).

我的建议是某种CI作业,例如Jenkins作业,它使用为CodeCommit和S3访问配置的IAM角色,定期轮询您的存储库( s),获取更改,并使用您选择的语言来处理提交并将更改推送到S3。这是一种回旋方式吗?是的,但目前我无法提出一种AWS本地方法。我会,希望看到有人提出更好的建议。

My suggestion would be some sort of CI job, such as a Jenkins job, using an IAM role that is configured for CodeCommit and S3 access, that regularly polls your repo(s), picks up the changes, and uses a language of your choice to handle the commit and push the changes to S3. Is this a round-about way of doing it? Yes, but I am unable to come up with an AWS-native way to do it at the moment. I would love to see someone suggest a better way.

这篇关于将文件从CodeCommit部署到S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆