aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
[Resource Type] - [BUG] - AWS::S3Tables::Namespace incorrect Return values
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
Other
### Resource Name
AWS::S3Tables::Namespace
### Issue Description
According to CloudFormation doc for the resource type `AWS::S3Tables::Namespace`, the Ref is supposed to return the namespace name[1].
```
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the namespace name.
```
However, it returns an ARN instead.
[1] AWS::S3Tables::Namespace Return values
https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-s3tables-namespace.html#aws-resource-s3tables-namespace-return-values
### Expected Behavior
Return the namespace name. Or provide a GetAtt return.
### Observed Behavior
It returns an ARN instead of the namespace name
### Test Cases
As shown in the sample template, using Ref to retrieve the `AWS::S3Tables::Namespace Namespace` returns an ARN which is incorrect according to the CloudFormation Resource doc[1].
```
Resources:
s3table:
Type: AWS::S3Tables::Table
Properties:
Namespace: !Ref s3tablenamespace -------> returns an ARN and not the namespace name
OpenTableFormat: ICEBERG
TableBucketARN: !GetAtt s3tablebucket.TableBucketARN
TableName: mys3tablename
WithoutMetadata: Yes
s3tablebucket:
Type: AWS::S3Tables::TableBucket
Properties:
TableBucketName: mys3tablebucket
s3tablenamespace:
Type: AWS::S3Tables::Namespace
Properties:
Namespace: mys3tablenamespace
TableBucketARN: !GetAtt s3tablebucket.TableBucketARN
```
[1] AWS::S3Tables::Namespace Return values
https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-s3tables-namespace.html#aws-resource-s3tables-namespace-return-values
### Other Details
As a workaround, we can use `Select and Split` to get the Namespace
`Namespace: !Select [1, !Split ["|", !Ref s3tablenamespace]]`
Contributor guide
Research direction
Start with the linked AWS::S3Tables::Namespace return-values documentation and reproduce the supplied sample template, checking what Ref returns for the namespace resource. Done means the observed behavior and the documented return value agree, with the issue’s expected namespace-name result or an explicitly documented alternative addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100