AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-12364

Anthony Kong's questions

Martin Hope
Anthony Kong
Asked: 2020-09-04 17:08:10 +0800 CST

如何运行 docker-compose yml 中定义的单个服务并忽略其他服务的错误?

  • 1

这是我的 docker compose yaml 文件

version: "3.7"
services:
  dynamo:
    image: bazel/production/local/docker/dynamodb:dynamodb
    env_file: dynamodb/${ENV}.env
    ports:
      - 7070:7070
    volumes:
        - ${REPO}/production/local/docker/dynamodb/start_dynamo.sh:/home/dynamodblocal/start.sh
        - dynamo-data:/home/dynamodblocal
    entrypoint: ""
    command: /home/dynamodblocal/start.sh

  redis50_cluster:
    image: bazel/production/local/docker/redis50:redis50
    ports:
      - 6380:6380
      - 6381:6381
      - 6382:6382
    volumes:
      - ${REPO}/production/local/docker/redis50/entrypoint.sh:/usr/local/bin/entrypoint.sh
      - ${REPO}/production/local/docker/redis50/redis-cluster-node0.conf:/etc/redis/redis-cluster-node0.conf
      - ${REPO}/production/local/docker/redis50/redis-cluster-node1.conf:/etc/redis/redis-cluster-node1.conf
      - ${REPO}/production/local/docker/redis50/redis-cluster-node2.conf:/etc/redis/redis-cluster-node2.conf
      - ${REPO}/production/local/docker/redis50/init_redis.sh:/usr/local/bin/init_redis.sh
      - ${REPO}/production/local/docker/redis50/check_redis.sh:/usr/local/bin/check_redis.sh
      - redis50-data:/data
    healthcheck:
      test: ["CMD", "check_redis.sh"]
      interval: 60s
      timeout: 5s
      retries: 12
      start_period: 10s

我只想启动redis服务,所以我尝试了这个命令

docker-compose -f docker-compose.yml up -d redis50_cluster

但是它失败了,因为

ERROR: Couldn't find env file: /Users/antkong/work/production/local/docker/dynamodb/local.env

我真的不关心 dynamodb 并且不想通过它的设置。

是否可以要求docker-compose忽略 yml 文件其他部分中的错误?

docker
  • 1 个回答
  • 572 Views
Martin Hope
Anthony Kong
Asked: 2020-04-16 06:05:50 +0800 CST

在应用 terraform 计划期间,如何在网络问题后清除 terraform 资源?

  • 1

我已经应用了一个 terraform 来创建一个 redis 集群。

进行到一半时,应用程序进程失败并显示以下错误消息:

Error: Error waiting for elasticache replication group (my-project) to be created: SerializationError: failed decoding Query response
    status code: 200, request id: 3d5a5394-20f0-4834-9e2a-9aff20cceecf
caused by: read tcp 192.168.86.116:53912->54.222.5.156:443: read: connection reset by peer

我知道我已经成功创建了集群,因为我可以使用redis-cli.

但是,如果我再做terraform apply一次,terraform 会说

module.my_project.aws_elasticache_replication_group.main[0] is tainted, so must be replaced

它试图破坏和重新创建资源,而不是no action像我预期的那样。

我已尝试将资源导入状态文件以纠正问题。但是 terraform 会引发错误:

错误:资源已由 Terraform 管理

如果操作一开始就成功,我将看不到tainted错误消息。

有什么办法可以从这个问题中恢复过来?我想避免删除然后重新创建资源。

理想情况下,我希望我可以清除状态文件中的资源,这样 terraform 就不会尝试破坏新创建的集群。

terraform redis
  • 2 个回答
  • 3731 Views
Martin Hope
Anthony Kong
Asked: 2020-04-15 22:57:59 +0800 CST

如果redis引擎版本低于5.0.5,如何修改redis集群的auth_token?

  • 2

我在 AWS 上运行引擎版本为 5.0.3 的 redis 集群。

所以当我尝试使用这个 aws 命令来修改 auth_token

aws elasticache modify-replication-group \ 
--replication-group-id authtestgroup \ 
--auth-token This-is-the-set-token\ 
--auth-token-update-strategy SET \ 
--apply-immediately 

我收到了这个错误: An error occurred (InvalidParameterValue) when calling the ModifyReplicationGroup operation: The AUTH token modification is only supported for redis engine version 5.0.5 and above.

有什么方法可以修改 auth_token 而不是破坏并重新创建 redis 集群?

我只是想了解这个问题是否有任何已知的解决方法。

amazon-web-services redis
  • 1 个回答
  • 1199 Views
Martin Hope
Anthony Kong
Asked: 2020-01-23 18:42:05 +0800 CST

如何在不先删除 docker 容器的情况下重新使用它?

  • 0

我想用 docker 在本地运行一个 redis 服务器。我拉图像

docker pull redis

然后我用这个命令调出一个docker版本的redis服务器

docker run --name test -d redis redis-server --appendonly yes

对于我的测试,我关闭了这个实例。我用了

docker ps 

确认实例已关闭。

现在我想重新启动它,我明白了

docker:来自守护进程的错误响应:冲突。容器名称“/test”已被容器“29cae620afcc10c62f4704801178d71a041f4828c9f683b56a658affa9a01de5”使用。您必须删除(或重命名)该容器才能重用该名称。

除了先玩之外,有没有更快的重启它docker rm test。

docker
  • 1 个回答
  • 189 Views
Martin Hope
Anthony Kong
Asked: 2019-09-12 19:31:19 +0800 CST

如何找出 terraform 导入的 aws 策略附件 ID?

  • 1

我想将一些现有资源导入我的状态文件。

其中之一是政策附件。

由于状态文件中没有附件,如果我运行,terraform plan我将看到以下输出:

  # aws_iam_role_policy_attachment.ec2_adhoc_instance_sqs_policy_attachment will be created
  + resource "aws_iam_role_policy_attachment" "ec2_adhoc_instance_sqs_policy_attachment" {
      + id         = (known after apply)
      + policy_arn = "arn:aws:iam::999999999999:policy/import-sqs-read-write-policy"
      + role       = "import-sqs-user"
    }

如果我想导入它,我需要找出附件的ID:

tf -f dev import  aws_iam_role_policy_attachment.ec2_adhoc_instance_sqs_policy_attachmen <ID?>

但是我无法从控制台找到它:

在此处输入图像描述

我在运行 aws cli 时遇到问题,

$ aws clouddirectory list-policy-attachments --directory-arn 999999999999 --policy-reference import-sqs-read-write-policy

Error parsing parameter '--policy-reference': Expected: '=', received: 'EOF' for input:
import-sqs-read-write-policy

如何找出保单附件的 ID?

amazon-web-services
  • 1 个回答
  • 478 Views
Martin Hope
Anthony Kong
Asked: 2019-07-31 02:23:09 +0800 CST

为什么即使两者都是 HIT,cloudflare 也会返回两种不同格式的相同图像

  • 3

我在 Cloudflare 中打开了波兰语。

当图像首次在 chrome 中下载(Version 75.0.3770.142 (Official Build) (64-bit)在 OSX 中)时,chrome dev 控制台显示以下信息:

* age: 12286
* cache-control: public, max-age=31556926
* cf-bgj: imgq:85
* cf-cache-status: HIT
* cf-polished: degrade=85, origSize=25843, status=vary_header_present
* cf-ray: 4fe67aba4d6b6549-SYD
* content-length: 5951
* content-type: image/jpeg
* date: Tue, 30 Jul 2019 09:59:21 GMT
* etag: "9314546c183b5befa64e265c89dc981f"
* expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
* expires: Wed, 29 Jul 2020 15:48:07 GMT
* last-modified: Thu, 11 Jul 2019 06:18:02 GMT
* server: cloudflare
* status: 200

然后,当我以相同版本但以隐身模式访问相同图像时,我得到以下信息:

* age: 21
* cache-control: public, max-age=31556926
* cf-bgj: imgq:85
* cf-cache-status: HIT
* cf-polished: qual=85, origFmt=jpeg, origSize=25843
* cf-ray: 4fe68b808803da4a-SYD
* content-disposition: inline; filename="image.webp"
* content-length: 3764
* content-type: image/webp
* date: Tue, 30 Jul 2019 10:10:49 GMT
* etag: "9314546c183b5befa64e265c89dc981f"
* expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
* expires: Wed, 29 Jul 2020 15:59:35 GMT
* last-modified: Thu, 11 Jul 2019 06:18:02 GMT
* server: cloudflare
* status: 200

我不明白的是:如果两个访问都是 HIT(即 CDN 中有缓存的图像),为什么我得到了webp第二次?

在我的第一个请求中,标头如下所示:

:authority: public.my-server.com
:method: GET
:path: /image.jpg
:scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
accept-encoding: gzip, deflate, br
accept-language: en-GB,en-US;q=0.9,en;q=0.8,zh-TW;q=0.7,zh-CN;q=0.6,zh;q=0.5
cache-control: no-cache
cookie: __cfduid=xxxxx
pragma: no-cache
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36

第二个请求很简单:

Origin: https://public.my-server.com
Referer: https://public.my-server.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36

为什么不同的图像类型?

cloudflare
  • 1 个回答
  • 1342 Views
Martin Hope
Anthony Kong
Asked: 2019-07-16 21:42:48 +0800 CST

如何使用 aws cli 删除 cloudwatch 事件规则?

  • 0

我terraform destroy用来破坏一些资源。然而它在这一步失败了:

  • module.restore_db_from_snapshot.aws_cloudwatch_event_rule.event_rule: aws_cloudwatch_event_rule.event_rule: AccessDeniedException:用户:arn:aws:sts::941225788888:assumed-role/delete/anthony_credentials 无权执行:事件:DescribeRule 资源:arn:aws:events: us-east-2:941225788888:rule/dev-crazy_rule 状态码:400,请求 id:da4284e5-3b00-4a24-9798-fcb6915c94cb

显然我的个人资料没有足够的调用权events:DescribeRule。但是我认为我的个人资料仍然有权删除它。

这就是为什么我想使用awscli 直接删除事件规则,可能使用 ARN,如错误消息中所示。

但是,当我检查cloudwatchsubcommandd 时,它没有任何delete事件规则。

我可以通过 aws cli 删除事件规则吗?

aws-cli
  • 2 个回答
  • 1420 Views
Martin Hope
Anthony Kong
Asked: 2019-07-10 23:34:19 +0800 CST

如何修复旧 AMI 映像中缺少 Elastic Network Adapter (ENA) 从而阻止实例启动的问题?

  • 3

我有一个旧的 AMI,它曾经在 c4.large 机器上运行。

由于这个类在所有可用区都不可用,所以我选择了一个 c5.large 来恢复图像。

但是,当我运行 terraform 进行恢复时,我收到了以下错误消息:

发生 1 个错误:

  • aws_instance.convertor:发生 1 个错误:

  • aws_instance.convertor:启动源实例时出错:InvalidParameterCombination:“c5.large”实例类型需要使用 Elastic Network Adapter (ENA) 增强联网。确保您使用的是为 ENA 启用的 AMI。状态码:400,请求 ID:7f32e7a1-c201-4db3-9f9e-6da4657ba9c8

如何找到可以接受这个旧 AMI 的实例类型?或者有什么我可以应用到 AMI 以使用更新的实例类型?

amazon-ec2
  • 1 个回答
  • 5720 Views
Martin Hope
Anthony Kong
Asked: 2019-07-10 03:04:54 +0800 CST

使用packer构建windows AMI时如何提供ssh_username

  • 1

当我跑packer build -var aws_access_key=$AWS_ACCESS_KEY_ID -var aws_secret_key=$AWS_SECRET_ACCESS_KEY windows-2012.json

我收到了这个错误:

1 error(s) occurred:

* An ssh_username must be specified
  Note: some builders used to default ssh_username to "root".

但是,Windows 2012 中没有对 ssh 的本机支持。那么我怎样才能想出一个ssh_username呢?

当我使用 terraform 构建服务器时,我使用了WinRM协议。我可以指示打包程序使用 WinRM 吗?

windows-server-2012-r2
  • 1 个回答
  • 751 Views
Martin Hope
Anthony Kong
Asked: 2019-07-10 02:55:06 +0800 CST

由于无效字符,打包程序无法解析 json

  • 0

我想使用打包器来构建一个 ami。

AMI 最初是由aws_instanceterraform 中的资源构建的。它包含以下内容user_data

<powershell>
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
net stop winrm
sc.exe config winrm start=auto
net start winrm
</powershell>

当我将其复制并粘贴到打包器 json 文件中时,打包器不喜欢它:

$ packer build windows-2012.json
Failed to parse template: Error parsing JSON: invalid character '\n' in string literal
At line 22, column 1 (offset 560):
   21:     "user_data": "<powershell>
   22:

我该如何解决?

terraform
  • 1 个回答
  • 1664 Views
Martin Hope
Anthony Kong
Asked: 2019-07-10 00:21:02 +0800 CST

如何使用 terraform 和 powershell 自动安装 .net framework 3.5?

  • 0

操作系统为 Windows Server 2012。

在此处输入图像描述

在服务器上启动进程时会弹出此对话框。

是否可以自动安装该功能?

windows-server-2012-r2
  • 1 个回答
  • 385 Views
Martin Hope
Anthony Kong
Asked: 2019-07-09 23:24:46 +0800 CST

访问 SQS 队列需要哪些权限?

  • 0

我正在尝试打开一个 SQS 队列,但出现此错误:

2019-07-09 07:20:31,855 pid 3604 tid  800 ERROR    connection <?xml version="1.0
"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Typ
e>Sender</Type><Code>AWS.SimpleQueueService.NonExistentQueue</Code><Message>The
specified queue does not exist or you do not have access to it.</Message><Detail
/></Error><RequestId>fa3bf29c-d5ad-525a-aa55-a70297d241fa</RequestId></ErrorResp
onse>

我已验证队列名称是否正确。

这是我授予 IAM 角色的权限:

在此处输入图像描述

IE

            "sqs:ChangeMessageVisibility",
            "sqs:ReceiveMessage",
            "sqs:SendMessage",

如果我运行以下

 aws sqs receive-message --queue-url https://sqs.us-west-2.amazonaws.com/12345678/my-queue

它不会抛出任何异常。

在我的代码中,我使用 boto 连接到 SQS 队列

sqs_conn = boto.sqs.connect_to_region(self.region)
LOG.debug("Getting queue for %s" % queue_name)
return sqs_conn.get_queue(queue_name)

我是否错过了连接到 SQS 队列的任何权限?

amazon-web-services
  • 1 个回答
  • 14035 Views
Martin Hope
Anthony Kong
Asked: 2019-07-07 03:47:38 +0800 CST

如何通过脚本在 Windows Server 2016 中允许 cookie?

  • 1

我根本无法对 Windows Server 2016 上的任何外部站点使用 cookie。

在此处输入图像描述

但是我需要连接到一些外部来激活一些软件。

是否可以通过脚本更改安全性?我正在使用 Terraform 来配置这些服务器。Powershell 脚本和任何其他脚本语言都可以。

windows-server-2016
  • 1 个回答
  • 1034 Views
Martin Hope
Anthony Kong
Asked: 2019-07-07 01:17:34 +0800 CST

如何在 ec2 实例上的 WIndows 服务器 2016 上安装 python

  • 0

我正在尝试python-2.7.14.amd64.msi在 ec2 实例上的 Windows Server 2016 上安装

版本信息:Windows Server 2016 Datacenter

在此处输入图像描述

为什么我无法在此服务器上安装 python?

windows-server-2016
  • 1 个回答
  • 886 Views
Martin Hope
Anthony Kong
Asked: 2019-07-06 22:24:26 +0800 CST

如何找出最相似的 aws 实例类“c4.large”及其可用性?

  • 0

当我尝试应用我的 terraform 时,出现此错误

  • aws_instance.new_instance:启动源实例时出错:不支持:您请求的可用区 (us-west-2d) 不支持您请求的实例类型 (c4.large Windows)。请通过不指定可用区或选择 us-west-2a、us-west-2b、us-west-2c 来重试您的请求。

有没有什么简单的方法可以找出下一个壁橱实例类及其可用区?

amazon-web-services
  • 2 个回答
  • 141 Views
Martin Hope
Anthony Kong
Asked: 2019-07-04 22:00:41 +0800 CST

如何修复“NoCredentialProviders:链中没有有效的提供者。已弃用。”?

  • 10

这是我从这个 repo中提取的一个 terraform 脚本

provider "aws" {
  region  = "${var.aws_region}"
  profile = "${var.aws_profile}"
}

##----------------------------
#     Get VPC Variables
##----------------------------

#-- Get VPC ID
data "aws_vpc" "selected" {
  tags = {
    Name = "${var.name_tag}"
  }
}

#-- Get Public Subnet List
data "aws_subnet_ids" "selected" {
  vpc_id = "${data.aws_vpc.selected.id}"

  tags = {
    Tier = "public"
  }
}

#--- Gets Security group with tag specified by var.name_tag
data "aws_security_group" "selected" {
  tags = {
    Name = "${var.name_tag}*"
  }
}

#--- Creates SSH key to provision server
module "ssh_key_pair" {
  source                = "git::https://github.com/cloudposse/terraform-aws-key-pair.git?ref=tags/0.3.2"
  namespace             = "example"
  stage                 = "dev"
  name                  = "${var.key_name}"
  ssh_public_key_path   = "${path.module}/secret"
  generate_ssh_key      = "true"
  private_key_extension = ".pem"
  public_key_extension  = ".pub"
}

#-- Grab the latest AMI built with packer - widows2016.json
data "aws_ami" "Windows_2016" {
  owners = [ "amazon", "microsoft" ]
  filter {
    name   = "is-public"
    values = ["false"]
  }

  filter {
    name   = "name"
    values = ["windows2016Server*"]
  }

  most_recent = true
}

#-- sets the user data script
data "template_file" "user_data" {
  template = "/scripts/user_data.ps1"
}


#---- Test Development Server
resource "aws_instance" "this" {
  ami                  = "${data.aws_ami.Windows_2016.image_id}"
  instance_type        = "${var.instance}"
  key_name             = "${module.ssh_key_pair.key_name}"
  subnet_id            = "${data.aws_subnet_ids.selected.ids[01]}"
  security_groups      = ["${data.aws_security_group.selected.id}"]
  user_data            = "${data.template_file.user_data.rendered}"
  iam_instance_profile = "${var.iam_role}"
  get_password_data    = "true"

  root_block_device {
    volume_type           = "${var.volume_type}"
    volume_size           = "${var.volume_size}"
    delete_on_termination = "true"
  }

  tags {
    "Name"    = "NEW_windows2016"
    "Role"    = "Dev"
  }

  #--- Copy ssh keys to S3 Bucket
  provisioner "local-exec" {
    command = "aws s3 cp ${path.module}/secret s3://PATHTOKEYPAIR/ --recursive"
  }

  #--- Deletes keys on destroy
  provisioner "local-exec" {
    when    = "destroy"
    command = "aws s3 rm 3://PATHTOKEYPAIR/${module.ssh_key_pair.key_name}.pem"
  }

  provisioner "local-exec" {
    when    = "destroy"
    command = "aws s3 rm s3://PATHTOKEYPAIR/${module.ssh_key_pair.key_name}.pub"
  }
}

当我调整时,terraform plan我收到此错误消息:

Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.template_file.user_data: Refreshing state...

Error: Error refreshing state: 1 error(s) occurred:

* provider.aws: error validating provider credentials: error calling sts:GetCallerIdentity: NoCredentialProviders: no valid providers in chain. Deprecated.
    For verbose messaging see aws.Config.CredentialsChainVerboseErrors
terraform
  • 2 个回答
  • 71049 Views
Martin Hope
Anthony Kong
Asked: 2019-07-04 19:29:10 +0800 CST

是否可以将 aws_ami 资源的所有者设置为“任何”?

  • 0

我正在尝试terraform plan针对包含此代码的 tf 文件:

data "aws_ami" "Windows_2016" {
  filter {
    name   = "is-public"
    values = ["false"]
  }

  filter {
    name   = "name"
    values = ["windows2016Server*"]
  }

  most_recent = true
}

错误:data.aws_ami.Windows_2016:“所有者”:未设置必填字段

如果我运行它仍然会失败

 terraform plan -var "owners=[]" 

我没有任何数据owners因为

  1. 我自己没有建立任何窗口 2016 ami
  2. 我不在乎楼主

可以告诉 terraform 我不担心owners吗?某种通配符*,也许?

terraform
  • 1 个回答
  • 807 Views
Martin Hope
Anthony Kong
Asked: 2019-07-03 21:32:17 +0800 CST

如何从这个 terraform 破坏行动中恢复?

  • 2

我正在尝试在 AWS 上销毁一些 terraform 创建的资源。

Terraform 提出了这个计划

Terraform will perform the following actions:

  - aws_lambda_function.myproject-mainprocess-restore-db-from-snapshot

  - module.myproject-mainprocess.aws_db_event_subscription.send_rds_event_to_sns

  - module.myproject-mainprocess.aws_lambda_permission.allow_sns_call_rds_lambda

  - module.myproject-mainprocess.aws_sns_topic_subscription.call_lambda_by_sns

  - module.myproject-mainprocess.module.lambda.aws_iam_policy.lambda_policy

  - module.myproject-mainprocess.module.lambda.aws_iam_policy.lambda_policy_logs

  - module.myproject-mainprocess.module.lambda.aws_iam_role.lambda_role

  - module.myproject-mainprocess.module.lambda.aws_iam_role_policy_attachment.policy_attachment

  - module.myproject-mainprocess.module.lambda.aws_iam_role_policy_attachment.policy_attachment_logs

  - module.myproject-mainprocess.module.lambda.aws_lambda_function.lambda

  - module.myproject-mainprocess.module.lambda.datadog_monitor.lambda_errors_alert

  - module.myproject-mainprocess.module.rds_event_sns.aws_sns_topic.topic_simple

但是,由于我的 aws 个人资料缺少某些删除权限,其中一个步骤失败了:

  - module.myproject-mainprocess.aws_db_event_subscription.send_rds_event_to_sns


Error: Error applying plan:

1 error(s) occurred:

* module.media-rotate-reports-db.aws_db_event_subscription.send_rds_event_to_sns (destroy): 1 error(s) occurred:

* aws_db_event_subscription.send_rds_event_to_sns: Error deleting RDS Event Subscription dev-media-rotate-reports-db-rds-snapshot-creation-event-subscription: AccessDenied: User: arn:aws:sts::141225792464:assumed-role/myteam/anthony_dev_credentials is not authorized to perform: rds:DeleteEventSubscription on resource: arn:aws:rds:us-east-1:141225792464:es:dev-myproject-mainprocess-rds-snapshot-creation-event-subscription
    status code: 403, request id: a20c2dbf-8526-4a8f-9d86-71f2df4507c5

aws_db_event_subscription我已使用替代 AWS 角色手动删除了上述内容。但是我无法让 terraform 恢复并忽略此错误。

Terraform 仍然需要执行以下操作:

Terraform will perform the following actions:

  - module.myproject-mainprocess.aws_db_event_subscription.send_rds_event_to_sns

  - module.myproject-mainprocess.module.rds_event_sns.aws_sns_topic.topic_simple 

如何告诉 Terraform 恢复并忽略module.myproject-mainprocess.aws_db_event_subscription.send_rds_event_to_sns已删除的内容?

amazon-web-services
  • 1 个回答
  • 841 Views
Martin Hope
Anthony Kong
Asked: 2019-06-27 22:30:05 +0800 CST

如何从“aws rds describe-events”中过滤 rds 事件?

  • 0

如果我跑aws --profile dev rds describe-events,

我得到这样的输出:

{
    "Events": [
        {
            "SourceIdentifier": "dev-important-data",
            "SourceType": "db-instance",
            "Message": "CloudWatch Logs Export enabled for logs [audit, error, general, slowquery]",
            "EventCategories": [],
            "Date": "2019-06-27T05:26:02.469Z",
            "SourceArn": "arn:aws:rds:us-east-1:141888792464:db:dev-important-data"
        }
}

是否可以对输出应用过滤器,这样我只会看到来自某个特定的事件SourceIdentifier?

我试过了

aws --profile dev rds describe-events --duration 1000 --filters "Name=SourceIdentifier,Values=dev-important-data"

但我得到了错误:

Unrecognized filter name: SourceIdentifier

然后我尝试使用 value Events.SourceIdentifier,但仍然是同样的错误:Unrecognized filter name: Events.SourceIdentifier

构建过滤器的正确方法是什么?

amazon-rds
  • 1 个回答
  • 479 Views
Martin Hope
Anthony Kong
Asked: 2019-06-27 15:03:52 +0800 CST

从快照中新恢复 mysql 数据库时如何禁用备份

  • 0

似乎从快照中恢复 mysql 数据库的那一刻,它会立即开始备份。

在此处输入图像描述

但为了我的目的,我只恢复这个快照来创建一个只读的数据库实例。我不需要备份任何东西。

我检查了restore-db-instance-from-db-snapshotAPI,没有参数可以让我关闭备份。

那么我该如何关闭它呢?我是否立即修改数据库并将自动备份设置为 false?

mysql
  • 1 个回答
  • 254 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve