Open Xenoha opened 2 months ago
Thanks @Xenoha for reaching out . I can see in the code why this is producing an error - https://github.com/aws/aws-cdk/blob/6f21c1d91237f4caf83283492226f447b882654a/packages/%40aws-cdk/aws-cognito-identitypool-alpha/lib/identitypool.ts#L330
I encountered a similar error, how do I fix them.
"@aws-cdk/aws-cognito-identitypool-alpha": "^2.100.0-alpha.0",
"aws-cdk-lib": "^2.100.0",
Describe the bug
When using the construct to lookup an IdentityPool from a SSM StringParameter. The construct throws validation errors because it is expecting an actual string of two parts separated by a ':'.
Expected Behavior
Should be able to lookup an Identity pool with a SSM StringParameter stringValue.
Current Behavior
Code at lines 118 of the Identitypool.js file throws
// if (!(idParts.length === 2)) // throw new Error('Invalid Identity Pool Id: Identity Pool Ids must follow the format <region>:<id>'); // if (idParts[0] !== pool.region) // throw new Error('Invalid Identity Pool Id: Region in Identity Pool Id must match stack region');
Reproduction Steps
const identityPool = IdentityPool.fromIdentityPoolArn(this, 'some-identityPool', indentityPoolStringParameter.stringValue)
Possible Solution
Review other constructs best practices for allowing SSM StringParameter lookup stringValue strings.
Additional Information/Context
No response
CDK CLI Version
2.135.0
Framework Version
No response
Node.js Version
20.12.0
OS
Linux
Language
TypeScript
Language Version
Typescript 5.4.4
Other information
No response