我为 AWS 开发人员高级用户提供了这个托管策略,它允许用户访问除 IAM 和组织之外的所有 AWS 资源和操作(仅比管理员角色低一级)。
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Federated:
- !Sub "arn:aws:iam::${AWS::AccountId}:saml-provider/ABC"
Action: 'sts:AssumeRoleWithSAML'
Condition:
StringEquals:
SAML:aud: "https://signin.aws.amazon.com/saml"
Path: /
Policies:
- PolicyName: ABC
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
NotAction:
- iam:*
- organizations:*
- account:*
Resource: '*'
- Effect: Allow
Action:
- iam:CreateServiceLinkedRole
- iam:DeleteServiceLinkedRole
- iam:ListRoles
- organizations:DescribeOrganization
- account:ListRegions
Resource: '*'
我想在特定日期之间限制对用户的访问(例如在部署计划期间),并在下面添加了 Date 运算符的代码。
Condition:
DateGreaterThan:
aws:CurrentTime: '2020-04-01T00:00:00Z'
DateLessThan:
aws:CurrentTime: '2020-06-30T23:59:59Z'
但是,将上述条件子句添加到 PowerUserManaged 策略会在 AWS 控制台中部署策略期间引发错误 400 Malformed。
是否可以将日期条件子句添加到 PowerUserAccess 托管策略? https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_developer-power-user