我正在运行Ubuntu 12.04并尝试使用Heroku CLI以及新下载的AWS Elastic Beanstalk CLI工具.
我的.bashrc中已经有了这个代码:
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
Run Code Online (Sandbox Code Playgroud)
我也想输出这个:
#for Elastic Beanstalk - madebyian
export PATH=$PATH:/opt/AWS-ElasticBeanstalk-CLI-2.6.0/eb/linux/python3/
Run Code Online (Sandbox Code Playgroud)
我如何获得两个CLI工具和/或我的语法EDIT有什么问题:[如果有的话]?
正如标题所示,我没有找到一个好的方法来安装aws-cli(https://github.com/aws/aws-cli/)而没有root访问权限(或相当于sudo权限).
如果Homebrew设置了一些目录和权限以便设置将来的安装,Mac上的设置方式可能会暗示它.但是,我还没有在Linux中找到任何方法(特别是Red Hat Enterprise Linux或CentOS发行版).
我也知道SCL从RHEL的(https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/scl-utils.html)当然,同样需要sudo.
我试图通过AWS CLI删除cloudfront分发.干
aws cloudfront delete-distribution --id <DISTRIBUTION-ID>
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
A client error (InvalidIfMatchVersion) occurred when calling the DeleteDistribution operation:
The If-Match version is missing or not valid for the resource.
Run Code Online (Sandbox Code Playgroud)
我不太明白,这个错误意味着什么以及如何解决它.
从这个文档我假设,有必要首先禁用分发.但如果是这样 - 我如何使用CLI执行此操作?
根据aws validate-template,我做了测试,以验证URL和本地文件中的相同模板.
但我得到了不同的输出.
直接从URL测试:
$ aws cloudformation validate-template --template-url https://s3.amazonaws.com/cloudformation-templates-us-east-1/S3_Bucket.template
{
"Description": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters": []
}
Run Code Online (Sandbox Code Playgroud)
但是当我将它下载到本地时,再次测试.
$ wget https://s3.amazonaws.com/cloudformation-templates-us-east-1/S3_Bucket.template
2014-12-16 14:48:27 (11.1 MB/s) - 'S3_Bucket.template' saved [652/652]
$ aws cloudformation validate-template --template-body S3_Bucket.template
A client error (ValidationError) occurred …Run Code Online (Sandbox Code Playgroud) 我正在尝试将Docker应用程序部署到Circle CI的Elastic Beanstalk上.
我的circle.yml的部署部分是
deployment:
hub:
branch: [internal, production]
commands:
- pip install awscli
- docker push company/web:$CIRCLE_SHA1
- sudo bash deploy.sh $CIRCLE_SHA1 $CIRCLE_BRANCH $CIRCLE_BUILD_NUM
Run Code Online (Sandbox Code Playgroud)
我的deploy.sh调用aws cli如下
aws --version
aws configure set aws_access_key_id $AWSKEY
aws configure set aws_secret_access_key $AWSSECRETKEY
aws configure set default.region us-west-2
aws configure set default.output json
echo "SAVING NEW DOCKERRUNFILE: $DOCKERRUN_FILE"
aws s3 cp $DOCKERRUN_FILE s3://$EB_BUCKET/$DOCKERRUN_FILE
Run Code Online (Sandbox Code Playgroud)
但是我得到了错误
--version:错误的元参数?
sanity-check:"/ root /.awssecret":文件丢失.(格式:AccessKeyID \nSecretAccessKey \n)
configure:unknown命令用法:aws ACTION [ - help]
该脚本使用完全相同的密钥和秘密在mac os本地完全正常工作.
awscli的两个版本(在圆圈和我的mac上)都是1.7.14
如果正常运行时间超过N小时,检查EC2实例正常运行时间以及可能发送警报的最佳方法是什么?如何使用CloudWatch,Lambda等默认AWS工具进行组织?
amazon-ec2 amazon-web-services amazon-cloudwatch aws-cli uptime-monitoring
我在aws之后尝试下面的命令
--configure command:
aws dynamodb create-table
--table-name MusicCollection2
--attribute-definitions
AttributeName=Artist,AttributeType=S AttributeName=SongTitle,AttributeType=S --
key-schema AttributeName=Artist,KeyType=HASH AttributeName=SongTitle,KeyType=RANGE
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
Run Code Online (Sandbox Code Playgroud)
输出:没什么
请提供有关如何使用AWS CLI创建dyanmodb表的建议.
由于某种原因,有一堆包含许多不同文件的存储桶,所有这些文件都具有相同的前缀但具有不同的日期:
backup.2017-01-01aa
backup.2017-01-01ab
backup.2017-01-15aa
backup.2017-01-15ab
backup.2017-02-01aa
backup.2017-02-01ab
等等..
如何仅下载以"backup.2017-01-01"开头的文件?
我正在使用以下命令通过AWS CLI创建RDS
create-db-instance
Run Code Online (Sandbox Code Playgroud)
RDS正在创建,但是我要等到RDS进入“可用”状态,以便我可以执行脚本的其余部分。我不确定如何实现这一目标。
您可以在Amazon Athena中创建视图吗?概述了如何使用用户界面创建视图。
我想以编程方式创建一个AWS Athena View,理想情况下使用Terraform(称为CloudFormation)创建。
我遵循此处概述的步骤:https : //ujjwalbhardwaj.me/post/create-virtual-views-with-aws-glue-and-query-them-using-athena,但是我遇到了一个问题视图很快就会过时。
...._view' is stale; it must be re-created.
terraform代码如下所示:
resource "aws_glue_catalog_table" "adobe_session_view" {
database_name = "${var.database_name}"
name = "session_view"
table_type = "VIRTUAL_VIEW"
view_original_text = "/* Presto View: ${base64encode(data.template_file.query_file.rendered)} */"
view_expanded_text = "/* Presto View */"
parameters = {
presto_view = "true"
comment = "Presto View"
}
storage_descriptor {
ser_de_info {
name = "ParquetHiveSerDe"
serialization_library = "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe"
}
columns { name = "first_column" type = "string" }
columns { name = …Run Code Online (Sandbox Code Playgroud) aws-cloudformation aws-cli terraform amazon-athena terraform-provider-aws
aws-cli ×10
amazon-ec2 ×1
amazon-rds ×1
amazon-s3 ×1
bash ×1
centos ×1
circleci ×1
redhat ×1
terraform ×1
ubuntu-12.04 ×1