-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-cognito-identitypoolbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp2
Description
Describe the bug
Using Fn.importValue method from aws-cdk-lib as input for IdentityPool.fromIdentityPoolArn or IdentityPool.fromIdentityPoolId will error out:
Error: Invalid Identity Pool Id: Identity Pool Ids must follow the format <region>:<id>
Expected Behavior
I expected for Fn.importValue to be a supported argument for fromIdentityPoolArn or fromIdentityPoolId static methods
Current Behavior
Using Fn.importValue('outputName') as ARN or Id arg throws out:
Error: Invalid Identity Pool Id: Identity Pool Ids must follow the format <region>:<id>
Reproduction Steps
// StackWithIdPool
import * as cognito_identitypool_alpha from "@aws-cdk/aws-cognito-identitypool-alpha";
const existingIdentityPool = new cognito_identitypool_alpha.IdentityPool(
this,
"IdentityPool",
{
identityPoolName: "some-id-pool",
allowUnauthenticatedIdentities: true,
}
);
new cdk.CfnOutput(this, "ExistingIdentityPoolArn", {
value: existingIdentityPool.identityPoolArn,
exportName: "existingIdentityPoolArn",
});// AnotherStack
cognito_identitypool_alpha.IdentityPool.fromIdentityPoolArn(
scope,
'ExistingIdentityPool',
Fn.importValue('existingIdentityPoolArn'),
);Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.110.1-1
Framework Version
No response
Node.js Version
18.13.0
OS
Windows 10
Language
TypeScript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-cognito-identitypoolbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp2