serverless-application-model icon indicating copy to clipboard operation
serverless-application-model copied to clipboard

sam deploy to support UserPoolTags

Open sodaru-it opened this issue 6 years ago • 0 comments

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

sodaru-it avatar Feb 15 '20 08:02 sodaru-it