(Application Autoscaling): Access the ARN or "unique identifier" of a ScalableTarget #28423
Labels
@aws-cdk/aws-autoscaling
Related to Amazon EC2 Auto Scaling
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
Currently, for the Application Autoscaling ScalableTarget, there is the scalableTargetId field. This represents the
ResourceId
in a request made to the RegisterScalableTarget API.If possible, we would like to access the ARN or the unique id of the scalable target itself, as described in the "Resources" subsection of the "Identity-based policies" section here
Use Case
We want to create identity-based policies for IAM roles to better control access to auto-scaling. We would like to create these roles using CDK because we have a multi-region architecture and need to set up these roles in multiple accounts per region. In order to create the roles, we need to access the Application Autoscaling unique identifier or ARN (like
arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123
). We want to avoid using wildcards in the resource field because each account manages multiple auto scaling targets.Proposed Solution
No response
Other Information
We could implement this by using a custom Lambda-based CloudFormation resource that calls the Application Autoscaling API directly. However, if possible, we would like to avoid using custom resources as the code that implements the custom functionality is separated from the code that defines the rest of our stacks.
Acknowledgements
CDK version used
2.115.0
Environment details (OS name and version, etc.)
macOS 13.6.2
The text was updated successfully, but these errors were encountered: