是否可以使用AWS CLI在AWS账户之间复制S3存储桶的内容?我知道可以在同一个帐户中的存储桶之间复制/同步,但我需要将旧AWS账户的内容转换为新账户.我在AWS CLI中配置了两个配置文件,但我没有看到如何在单个copy/sync命令中使用这两个配置文件.
我认为这是一个很容易解决的问题,但我似乎无法解决它!我花了很多时间在Google/SO上寻找任何潜在客户,但找不到解决方案.
执行时eb local run,我收到此错误:
注册表配置无效
$ eb local run
ERROR: InvalidConfigFile :: Invalid configuration for registry 12345678.dkr.ecr.eu-west-1.amazonaws.com
Run Code Online (Sandbox Code Playgroud)
我的图像行Dockerrun.aws.json如下:
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "frontend",
"host": {
"sourcePath": "/var/app/current/frontend"
}
},
{
"name": "backend",
"host": {
"sourcePath": "/var/app/current/backend"
}
},
{
"name": "nginx-proxy-conf",
"host": {
"sourcePath": "/var/app/current/config/nginx"
}
},
{
"name": "nginx-proxy-content",
"host": {
"sourcePath": "/var/app/current/content/"
}
},
{
"name": "nginx-proxy-ssl",
"host": {
"sourcePath": "/var/app/current/config/ssl"
}
}
],
"containerDefinitions": [
{
"name": "backend",
"image": "123456.dkr.ecr.eu-west-1.amazonaws.com/backend:latest", …Run Code Online (Sandbox Code Playgroud) amazon-web-services docker aws-cli amazon-elastic-beanstalk eb
我正在使用awscli下载文件:
$ aws s3 cp s3://mybucket/myfile myfile
Run Code Online (Sandbox Code Playgroud)
但下载被中断(电脑进入睡眠状态).我该如何继续下载?S3支持Range标头,但awscli s3 cp不允许我指定它.
该文件不可公开访问,因此我无法使用curl手动指定标头.
源目录包含许多大型图像和视频文件.
需要使用该aws s3 cp命令将这些文件上载到AWS S3存储桶.例如,作为此构建过程的一部分,我将我的图像文件复制my_image.jpg到S3存储桶,如下所示:aws s3 cp my_image.jpg s3://mybucket.mydomain.com/
我手动将此副本发送到AWS没有问题.我也可以编写脚本.但是我想使用makefile上传我的图像文件,my_image.jpg 如果我的S3存储桶中的同名文件比我的源目录中的文件旧.
通常make非常擅长基于文件日期的这种依赖性检查.但是,有什么方法可以告诉我make从S3存储桶中的文件获取文件日期并使用它来确定是否需要重建依赖项?
我正在尝试设置"Amazon Elastic Container Registry",但在使用此命令时出现以下错误aws ecr get-login --no-include-email --region us-west-2:
Unknown options: --no-include-email
当发生这种情况时,手册会重定向我,以转到下一页,以便更新我的aws cli.https://docs.aws.amazon.com/cli/latest/userguide/installing.html
简而言之,就是打电话pip install awscli --upgrade --user.虽然这有效,但我的cli没有更新.所以我完全删除了它pip uninstall awscli.但是aws当我在终端中打开一个新会话时,我仍然可以使用该命令...
所以我假设我没有通过pip安装我的aws cli,但我无法弄清楚它是如何安装的.任何人都可以帮助我,并给我一些方向来解决这个问题.所以我可以删除当前的awscli,并通过安装新版本pip install awscli --upgrade --user
我想这样做,以便 IAM 用户可以从 S3 存储桶下载文件,但在执行时访问被拒绝aws s3 sync s3://<bucket_name> .我尝试了各种方法,但都无济于事。我做的一些步骤:
aws configure在我的 CLI 中执行并为上述用户输入生成的访问密钥 ID 和秘密访问密钥我的存储桶有一个文件夹名称 AffectivaLogs,其中文件是由各种用户匿名添加的,看起来虽然存储桶是公开的,但其中的文件夹不是,我什至无法将其公开,这导致以下错误。
以下是公共访问设置:
更新:我按如下方式更新了存储桶策略,但它不起作用。
在 git bash 中使用 awscli,命令
aws s3 ls "s3://directory/"
Run Code Online (Sandbox Code Playgroud)
返回一个列表
PRE "filename"
Run Code Online (Sandbox Code Playgroud)
这很不方便,因为我需要对输出执行进一步的命令,而且我只需要给定目录中的文件/目录名称。
例如,能够执行以下操作会很好:
for dir in $(aws s3 ls s3://directory/) do
aws s3 ls $dir | grep .json;
done
Run Code Online (Sandbox Code Playgroud)
有什么建议可以解决这个问题吗?
I want to use aws lambda update-function-code command to deploy the code of my function. The problem here is that aws CLI always prints out some information after deployment. That information contains sensitive information, such as environment variables and their values. That is not acceptable as I'm going to use public CI services, and I don't want that info to become available to anyone. At the same time I don't want to solve this by directing everything from AWS command …
Internet 中的一些示例AWS_DEFAULT_REGION设置了 env 变量,但其他一些示例设置了 env 变量AWS_REGION。有什么不同?哪些服务使用一种或另一种?
我正在尝试卸载 awscli:
conda list | grep aws
awscli 1.18.78 pypi_0 pypi
(base) % conda remove awscli
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are missing from the target environment:
- awscli
Run Code Online (Sandbox Code Playgroud)
但由于某种原因conda找不到包。卸载 awscli 的正确方法是什么?