小编pzr*_*zrq的帖子

Python3:为什么__spec__有效?

变量__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)

python python-3.x

8
推荐指数
2
解决办法
1445
查看次数

使用 cdk 添加托管策略 aws

我正在尝试将托管策略添加到包含帐户 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已使用正确的帐户登录。

在此输入图像描述

amazon-web-services amazon-iam typescript aws-cdk

2
推荐指数
1
解决办法
6941
查看次数