Skip to content

[Resource Type] - [BUG] - AWS::S3Tables::Namespace incorrect Return values #2421

@tgyanen

Description

@tgyanen

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]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions