aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

AWS::AccountAlias - New Pseudo Parameter

Open
#650 9 comments 25 reactions 0 assignees View on GitHub
Coverage enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

# AWS::AccountAlias Pseudo Parameter

## Scope of Interest

Currently I use AWS::AccountId for different mappings logic within CFN templates and resource naming. However, it would be nice if rather than having to maintain a list of those account IDs in every template, I could reference accounts by the account ID within templates.

## Expected Behavior

I could use AWS::AccountAlias similar to how AWS::AccountId is used within templates. If the account alias is changed the already created CloudFormatiaon stack resources would maintain the previous account alias.

## Suggest specific test cases

Use where naming resources is required by organizations

Example:

```yaml
AWSTemplateFormatVersion: 2010-09-09
Description: Example usage of AWS::AccountAlias

Resources:
S3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub ${AWS::AccountAlias}-testbucket123
```

This would result in a bucket named `example-account-alias-testbucket123`

## Helpful Links to speed up research and evaluation

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html

https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAccountAliases.html

## Category

* Other - AWS CloudFormation
* Billing

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.