- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试编写一个 lambda 来监听来自 CloudWatch 的参数存储更改事件,并通过调用 boto3.client('ssm').get_parameter_history(Name=event["name"] 获取参数的历史数据,WithDecryption=True)
。此方法失败并显示消息:
botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the GetParameterHistory operation: The ciphertext refers to a customer master key that does not exist, does not exist in this region, or you are not allowed to access. (Service: AWSKMS; Status Code: 400; Error Code: AccessDeniedException; Request ID: blah-blah-blah)
下面是 lambda 的执行角色:
{
"roleName": "myapp-paramstore-updates-webhook-role",
"policies": [
{
"document": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "logs:CreateLogGroup",
"Resource": "arn:aws:logs:eu-west-1:000000000000:*"
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"arn:aws:logs:eu-west-1:000000000000:log-group:/aws/lambda/ssm-paramstore-updates-webhook:*"
]
}
]
},
"name": "LambdaBasicExeRole",
"type": "inline"
},
{
"document": {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"kms:DescribeKey",
"ssm:GetParameter"
],
"Resource": [
"arn:aws:kms:eu-west-1:000000000000:key/*",
"arn:aws:ssm:eu-west-1:000000000000:parameter/myorg/myteam/slack/webhooks/ssm-paramstore-updates-webhook",
"arn:aws:ssm:eu-west-1:000000000000:parameter/myorg/myteam/slack/webhooks/system-eventsupdates-webhook"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": "ssm:GetParameterHistory",
"Resource": "arn:aws:ssm:*:*:parameter/*"
}
]
},
"name": "readonly-ssm-paramstore-updates-webhook",
"type": "inline"
}
],
"trustedEntities": [
"lambda.amazonaws.com"
]
}
在我使用 ssm:GetParameterHistory
之前,有 ssm:DescribeParameters
,但我需要获取一些版本信息,因此进行了更改。一切都在同一个区域,lambda 和参数。
我现在需要什么额外的权限以及什么资源才能解决这个问题?
最佳答案
发现需要访问 key 的lambda角色需要在KMS中添加为 key 用户。基本上,需要向角色(或用户)授予权限,使其使用 key 对 secret 执行加密/解密。
这是从 KMS 控制台完成的,单击客户托管 key 列表中的 key 名称(假设它是您自己创建的 key ),向下滚动到 key 用户并添加需要使用该 key 的角色到允许的用户列表。
关于amazon-web-services - AWS : AccessDeniedException when calling ssm:GetParameterHistory on SSM Parameter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53682122/
我想在我的 EC2 实例 AWSFIS-Run-CPU-Stress 上运行 SSM 文档。它通过 AWS 故障注入(inject)模拟器 (FIS) 执行,这需要指定一个 documentARN,具
我正在尝试编写一个 lambda 来监听来自 CloudWatch 的参数存储更改事件,并通过调用 boto3.client('ssm').get_parameter_history(Name=eve
我有一个带有 CloudFormation 堆栈参数的 CDK 应用程序: project_name_param = cdk.CfnParameter( self, "ProjectN
我需要审核大量 AWS 账户以确定哪些 EC2 实例缺少 SSM 代理。然后我需要输出所有这些实例及其标签。 运行 aws ssm describe-instance-information 会列出所
背景 token的意思是“令牌”,是服务端生成的一串字符串,作为客户端进行请求的一个标识。 当用户第一次登录后,服务器生成一个token并将此token返回给客户端,以后客户端只需带上这个t
如果想用框架来实现验证码,可以看我的另外一篇: kaptcha 框架的使用很简单的。新手必备。 http://www.zzvips.com/article/171694.html 1、效果图
SpringBoot内部类注入 没有限制随意都能注入,会自动去找对应的内部类的,只要是能注入进容器中的,都能像正常的bean一样的使用 package com.service; import org
我在 lambda 中编写了 python 代码,用于从 SSM 运行命令,但出现错误错误 回复:{ "errorMessage": "2019-11-26T10:51:09.649Z d6a9aff
夏天到了、小雪来给大家降降温 话不多说、直接进入主题 主要功能模块设计: 登录注册、首页信息浏览、选课分类查看、选课详情查看、评论交流、收藏、浏览量、以及后台数据管理、用户
主要技术实现设计:spring、 springmvc、 springboot、 springboot security权限控制、mybatis 、session、 jquery 、 md5 、boo
主要功能设计: 用户、区域、物质类型、物质详情、物质申请和审核以及我的申请和通知公告以及灵活控制菜单权限 主要技术实现:spring、 springmvc、 springboot、sprin
第一次写上传图片的代码,碰到很多问题。昨天做了整整一天,终于在晚上的时候成功了。大声欢呼。 但是,做完之后,还是有很多问题想不通。所以在这里也算是写个笔记,日后忘记了可以回顾,也算请教各路朋友。(
1.1 maven项目pom管理 ? 1
我需要一些帮助/指导,了解如何安全访问 SSM 参数存储以获取现有 secureString 上的(已解密)值以用于其他 Terraform 资源? 例如,我们在 SSM 中存储了一个用于 CI 的
我已经编写了一个代码来为我获取 SSM 参数 import boto3 client = boto3.client('ssm') def lambda_handler(event, c
目录 咱们废话不多说进入主题、系统主页展示: 用户信息管理; 角色权限控制管理: 管理员查看灵活配置; 插入一小部分代码段 通知公告信息管
目录 1、基本概念 1.1、Spring 1.2、SpringMVC
我试过 moto,但我总是得到: botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) wh
我正在尝试同步一个 S3 存储桶,这需要将近 3 个小时才能完全同步。 同步桶.sh: nohup aws s3 sync "$source_bucket/$folder/" "s3://$desti
我有一个触发 Jenkins 工作的 lambda 函数。我想在添加新的 ssm 参数时调用此 lambda。我在 cloud-watch 事件模式中添加了以下自定义事件模式。 { "source
我是一名优秀的程序员,十分优秀!