Skip to content

sam deploy to support UserPoolTags #1453

@sodaru-it

Description

@sodaru-it

sam deploy fails when template has UserPool with UserPoolTags property

Steps to reproduce the issue:

  1. Create a template.yaml with following content
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Parameters:
  Product:
    Type: String
    Default: MyProduct
    MinLength: 5
    MaxLength: 20
  Stage:
    Type: String
    Default: Dev
    AllowedValues:
      - Prod
      - Dev

Resources:
  ExampleUserPool:
    Type: AWS::Cognito::UserPool
    DeletionPolicy: Retain
    Properties:
      UserPoolName: !Sub ${Product}-example
      UserPoolTags:
        Stage: !Ref Stage
        Product: !Ref Product
  1. run sam build
  2. run sam deploy

Observed result:

Initiating deployment
=====================

Waiting for changeset to be created..
Error: Failed to create changeset for the stack: entranse-idp, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Transform AWS::Serverless-2016-10-31 failed with: Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [ExampleUserPool] is invalid. Type of property 'UserPoolTags' is invalid. Resource with id [ExampleUserPool] is invalid. Type of property 'UserPoolTags' is invalid.

Expected result:
UserPool should be created successfully

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