title: How to get the Arn of a resource created in a cdk script
body: <p>I'm currently experimenting with AWS CDK and I'm stuck with something that, in my mind, should be easy.</p>
  <p>(I'm working with python, but I believe it's the same with any &quot;cdk enabled&quot; language )</p>
  <p>I can create a cognito UserPool (it works) :</p>
  <pre><code>    pool = cognito.CfnUserPool(self, &quot;cdk_test_pool&quot;, 
          admin_create_user_config=cognito.CfnUserPool.AdminCreateUserConfigProperty(
              allow_admin_create_user_only=True
          ), 
          auto_verified_attributes=[&quot;email&quot;], 
          policies=cognito.CfnUserPool.PoliciesProperty(
              password_policy=cognito.CfnUserPool.PasswordPolicyProperty(
                  minimum_length=6, 
                  require_lowercase=True, 
                  require_numbers=True, 
                  require_symbols=True, 
                  require_uppercase=True
              )
          ), 
          user_pool_name=&quot;cdk_test_pool&quot;
      )
  </code></pre>
  <p>An now I want to create an apigateway Authorizer, but I need the UserPool Arn :</p>
  <pre><code>    poolArn = ????????
      authorizer = apigateway.CfnAuthorizer(self, &quot;cdk-test-authorizer&quot;,
          rest_api_id=&quot;hello-api&quot;, 
          type=&quot;COGNITO_USER_POOLS&quot;, 
          identity_source=&quot;method.request.header.Authorization&quot;, 
          name=&quot;cdk-test-authorizer&quot;, 
          provider_arns=[poolArn]
      )
  </code></pre>
  <p>How can I do this ?</p>