- Newest
- Most votes
- Most comments
It looks like you're encountering an error when trying to access the ARN of a Redshift Serverless workgroup in CDK. The error AttributeError: 'CfnWorkgroup' object has no attribute 'attr_arn' indicates that you're using an incorrect attribute name.
For Amazon Redshift Serverless workgroups, the correct attribute to access the ARN is workgroupArn, not attr_arn. The workgroupArn is a string that represents the Amazon Resource Name (ARN) that links to the workgroup.
To fix your code, you should modify it to use:
workgroup_arn = workgroup.workgroupArn
This will correctly retrieve the ARN of your Redshift Serverless workgroup, which you can then use in your IAM role definition.
If you're using the L1 construct (CfnWorkgroup) directly, you might need to use the attrWorkgroupArn or ref property instead, depending on your CDK version and implementation.
Sources
Workgroup - Amazon Redshift Serverless
interface RedshiftServerlessConfigurationProperty · AWS CDK
RedshiftServerlessConfiguration - Amazon Bedrock
Relevant content
asked 9 months ago
asked 9 months ago
asked 9 months ago
asked 9 months ago
