变量__spec__来自哪里?
$ brew install python3
$ python3
Python 3.4.2 (default, Jan 5 2015, 11:57:21)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
# Under Python 2.7.x this gives a NameError
>>> None is __spec__
True
Run Code Online (Sandbox Code Playgroud) 我正在尝试将托管策略添加到包含帐户 ID 的角色:
const role = iam.Role.fromRoleArn(
this,
'Role',
`arn:aws:iam::${cdk.Stack.of(this).account}:role/example-role`,
);
role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonDynamoDBFullAccess'));
role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonKinesisFullAccess'));
Run Code Online (Sandbox Code Playgroud)
在 aws 控制台上,我看不到添加到角色中的策略。
仅供参考,我aws-cli已使用正确的帐户登录。