s3 AWS cli仅部署新文件命令

时间:2015-12-29 06:25:16

标签: amazon-web-services amazon-s3 aws-cli

我目前有一个工作网站,我们不断对其进行更改。我想知道是否有办法让./deploy脚本只部署新的更改,而不是每次都部署整个站点。

我的剧本目前就是这个。

aws s3 cp _site s3:/fake bucket name/ --recursive --region "ap-southeast-2"

1 个答案:

答案 0 :(得分:2)

请查看aws cli命令:s3 sync

http://docs.aws.amazon.com/cli/latest/reference/s3/sync.html

aws s3 sync _site s3://fake/ --recursive --region "ap-southeast-2"

首先使用--dry-run进行尝试,如果符合您的需要,请将其删除。