作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Resources:
GlueCrawlerRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- glue.amazonaws.com
Action:
- 'sts:AssumeRole'
Path: /service-role/
ManagedPolicyArns:
- 'arn:aws:iam::aws:policy/service-role/AWSGlueServiceRole'
Policies:
- PolicyName: GlueAccess
PolicyDocument:
Version: 2012-10-17
Statement:
- Sid: kmsKeyAccess
Effect: Allow
Action:
- 'kms:Encrypt'
- 'kms:Decrypt'
- 'kms:ReEncrypt*'
- 'kms:GenerateDataKey*'
- 'kms:DescribeKey'
Resource: !Ref KmsKeyArn
- Sid: logKmsKey
Effect: Allow
Action:
- 'logs:AssociateKmsKey'
Resource: !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws-glue/:*'
GlueCrawler:
Type: 'AWS::Glue::Crawler'
Properties:
Name: !Sub '${AWS::StackName}'
Role: !GetAtt GlueCrawlerRole.Arn
DatabaseName: !Sub '${AWS::StackName}-database'
Targets:
S3Targets:
- Path: !Ref MyS3Bucket
JdbcTargets:
-
ConnectionName: "XXXXXXX"
Path: "ABCD/%"
DatabaseName: "rds-xxxxx-abcd01-private-db"
SchemaChangePolicy:
UpdateBehavior: "UPDATE_IN_DATABASE"
DeleteBehavior: "DEPRECATE_IN_DATABASE"
TablePrefix: "aurora_rds_"
<>服务无法承担角色 arn:aws:iam::xxxxxxxxxx:role/cua-enterprise-data-hub-dev-test-g-GlueCrawlerRole-1FB4KV7YGL1QB。请验证角色的 TrustPolicy(服务:AWSGlue;状态代码:400;错误代码:InvalidInputException;请求 ID:bb1b60a5-3301-40de-81bf-ea78018cffa9)
最佳答案
您的资源不正确。而不是
Resource: 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws-glue/:*'
Resource: 'arn:aws:glue:${AWS::Region}:${AWS::AccountId}:*'
应该有(缺少 !Sub
):
Resource: !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws-glue/:*'
Resource: !Sub 'arn:aws:glue:${AWS::Region}:${AWS::AccountId}:*'
关于amazon-web-services - 服务无法承担角色错误 - 使用 JDBC 目标创建 AWS Glue cloudformation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66201426/
我在尝试使用 create-function 命令创建 lambda 函数时收到错误消息“Lambda 无法承担为函数定义的角色”。 aws lambda create-function --regi
我正在尝试使用代码放置 cloudwatch 事件规则: await cloudwatchevents.putRule({ Name: 'xxx-ec2-start', EventPatter
我有一个应用程序需要以不寻常的方式处理事件。 对于我的问题,我先说明一个简单的案例,Android目前的事件处理系统不适合我。 假设我有一个 FrameLayout(从现在起我将称之为 ViewSwi
我是一名优秀的程序员,十分优秀!