Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAM deploy stuck on "Waiting for changeset to be created.." #6883

Closed
5t33 opened this issue Mar 28, 2024 · 9 comments
Closed

SAM deploy stuck on "Waiting for changeset to be created.." #6883

5t33 opened this issue Mar 28, 2024 · 9 comments
Labels
area/deploy sam deploy command blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days type/question

Comments

@5t33
Copy link

5t33 commented Mar 28, 2024

Description:

sam deploy stalls on "Waiting for changeset to be created.." I've attempted several times. This stack is new, so I'm creating it fresh. I've tried deleting it and deploying again after its timed out a few times.

something to mention is that I originally accidentally added a parameter to the ecr string, but then fxed it.

Steps to reproduce:

aws-vault exec -- sam deploy --config-env dev

Observed result:

Build Succeeded

Built Artifacts  : .aws-sam/build
Built Template   : .aws-sam/build/template.yaml

Commands you can use next
=========================
[*] Validate SAM template: sam validate
[*] Invoke Function: sam local invoke
[*] Test Function in the Cloud: sam sync --stack-name {{stack-name}} --watch
[*] Deploy: sam deploy --guided
aws-vault exec museflow-main-dev-admin -- sam deploy --config-env dev

                Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-1q2s0qzjmw7m4
                A different default S3 bucket can be set in samconfig.toml
                Or by specifying --s3-bucket explicitly.
a36d8a52ae24: Layer already exists 
d584b8741e08: Layer already exists 
53b87099a601: Layer already exists 
9a000877459a: Layer already exists 
579823936cd8: Layer already exists 
7393ae547845: Layer already exists 
2d6640d0aba3: Layer already exists 
f8919a3b10e4: Layer already exists 
1d672e8b43a1: Layer already exists 
cognitolambda-56dac2f931b3-latest: digest: sha256:0d2da76832080ef90d88d9b469ad52801784caf644897bfe3c41a07880b5e674 size: 2205

        Deploying with following values
        ===============================
        Stack name                   : cognito-lambda-dev
        Region                       : us-west-2
        Confirm changeset            : True
        Disable rollback             : False
        Deployment image repository  : 
                                      <redacted>.dkr.ecr.us-west-2.amazonaws.com/cognito-lambda
        Deployment s3 bucket         : <redacted>
        Capabilities                 : ["CAPABILITY_NAMED_IAM"]
        Parameter overrides          : {"Environment": "dev", "AWSRegion": "us-west-2", "CognitoUserPoolId": "<redacted>"}
        Signing Profiles             : {}

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

        Uploading to cognito-lambda-dev/3ae4183316f9cdf867d4cbfc68cb9057.template  5270 / 5270  (100.00%)


Waiting for changeset to be created..

Expected result:

a deployment.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Mac OSX M2
  2. sam --version: SAM CLI, version 1.113.0
  3. AWS region: us-west-2
    sam --info:
➜  cognito-event-lambda 🔧 sam --info
{
  "version": "1.113.0",
  "system": {
    "python": "3.8.13",
    "os": "macOS-13.4-arm64-arm-64bit"
  },
  "additional_dependencies": {
    "docker_engine": "25.0.3",
    "aws_cdk": "Not available",
    "terraform": "1.3.3"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}

Add --debug flag to command you are running

template:

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31

Description: |
  This function listens for cognito events and forwards them where necessary

Parameters:
  Environment:
    Description: 'Required. Current environment.'
    Type: 'String'
    AllowedValues:
      - 'local'
      - 'dev'
      - 'prd'
  LogLevel:
    Description: Log level
    Type: String
    Default: info
  CognitoUserPoolId:
    Description: Cognito user pool ID
    Type: 'AWS::SSM::Parameter::Value<String>'
Resources:

  CognitoPreSignup:
    Type: Cognito
    Properties:
      UserPool: !Ref CognitoUserPoolId
      Trigger: PreSignUp
  CognitoPreTokenGeneration:
    Type: Cognito
    Properties:
      UserPool: !Ref CognitoUserPoolId
      Trigger: PreTokenGeneration
  
  LambdaInvokePermission:
    Type: 'AWS::Lambda::Permission'
    Properties:
      FunctionName: !GetAtt CognitoLambda.Arn
      Action: 'lambda:InvokeFunction'
      Principal: 
        - 'cognito-idp.amazonaws.com'
        - 'cognito-sync.amazonaws.com'
      SourceAccount: !Ref 'AWS::AccountId'
      SourceArn: !GetAtt RawInputBucket.Arn

  # Phrases output bucket is owned by Terraform to avoid dependency loop
  CognitoLambdaRole:
    Type: AWS::IAM::Role
    Properties:
      Path: !Sub '/${Environment}/serviceRoles/CognitoLambda/'
      RoleName: CognitoLambdaRole
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - lambda.amazonaws.com
            Action: sts:AssumeRole
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
        - 'arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess'
        - 'arn:aws:iam::aws:policy/AWSLambdaExecute'
      Policies:
        - PolicyName: !Sub 'CognitoLambda${Environment}'
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              - Effect: Allow
                Action:
                  - ssm:Describe*
                  - ssm:List*
                  - ssm:GetParameter
                Resource: 
                  - !Sub 'arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/museflow/${Environment}/cognito/user_pool_id2'
              - Effect: Allow
                Action:
                  - logs:CreateLogGroup
                  - logs:CreateLogStream
                  - logs:PutLogEvents
                Resource: !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group/aws/lambda/CognitoLambda${Environment}'
              - Effect: Allow
                Action:
                  - sqs:*
                Resource: !GetAtt CognitoLambdaDLQ.Arn
              - Effect: Allow
                Action:
                  - ecr:*
                Resource: 
                 - arn:aws:ecr:*:<redacted>:repository/cognito-lambda
                 - arn:aws:ecr:*:<redacted>:repository/cognito-lambda*
              - Effect: Allow
                Action:
                  - ecr:GetAuthorizationToken
                Resource: '*'
  CognitoLambdaDLQ: 
    Type: AWS::SQS::Queue
    Properties:
      QueueName: !Sub 'CognitoLambda${Environment}DLQ'
  CognitoLambdaLogs:
    Type: AWS::Logs::LogGroup
    Properties:
      LogGroupName: !Sub '/aws/lambda/CognitoLambda${Environment}'
      RetentionInDays: 7
      Tags: 
        - Key: Environment
          Value: !Ref Environment
  CognitoLambda:
    Type: AWS::Serverless::Function
    Metadata:
      Dockerfile: Dockerfile
      DockerContext: ./
      DockerTag: latest
    Properties:
      FunctionName: !Sub 'CognitoLambda${Environment}'
      Role: !GetAtt CognitoLambdaRole.Arn
      PackageType: Image
      Timeout: 900
      MemorySize: 1024
      Tracing: Active
      Environment:
        Variables:
          AWSRegion: !Sub '${AWS::Region}'
          Environment: !Ref Environment
          LogLevel: !Ref LogLevel
      AutoPublishAlias: live
      DeploymentPreference:
        Type: AllAtOnce
        # Alarms:
        #   # A list of alarms that you want to monitor
        #   - !Ref AliasErrorMetricGreaterThanZeroAlarm
        #   - !Ref LatestVersionErrorMetricGreaterThanZeroAlarm
        # Hooks:
        #   # Validation Lambda functions that are run before & after traffic shifting
        #   PreTraffic: !Ref PreTrafficLambdaFunction
        #   PostTraffic: !Ref PostTrafficLambdaFunction
      DeadLetterQueue:
        Type: SQS
        TargetArn: !Sub 'arn:aws:sqs:us-west-2:${AWS::AccountId}:CognitoLambda${Environment}DLQ'
  
  AllowS3ToCallS3EventHandlerPermission:
    Type: AWS::Lambda::Permission
    Properties:
      Action: 'lambda:InvokeFunction'
      FunctionName: !Ref CognitoLambda
      Principal: 
        - 'cognito-idp.amazonaws.com'
        - 'cognito-sync.amazonaws.com'
      SourceArn: !Sub 'arn:aws:cognito-idp:us-west-2:${AWS::AccountId}:userpool/${CognitoUserPoolId}'

samconfig.toml

version=0.1

[default.global.parameters]
no_beta_features = true
region = "us-west-2"

[dev.deploy.parameters]
region = "us-west-2"
stack_name = "cognito-lambda-dev"
s3_prefix = "cognito-lambda-dev"
confirm_changeset = true
capabilities = "CAPABILITY_NAMED_IAM"
tags = "project=\"cognito-lambda\" stage=\"dev\" Environment=\"dev\""
parameter_overrides = "Environment=\"dev\" AWSRegion=\"us-west-2\" CognitoUserPoolId=\"/<redacted>/dev/cognito/user_pool_id2\""
disable_rollback = false
resolve_s3 = true
image_repository="<redacted>.dkr.ecr.us-west-2.amazonaws.com/cognito-lambda"

[prd.deploy.parameters]
region = "us-west-2"
stack_name = "cognito-lambda-prd"
s3_prefix = "cognito-lambda-prd"
confirm_changeset = true
capabilities = "CAPABILITY_NAMED_IAM"
tags = "project=\"cognito-lambda\" stage=\"prd\" Environment=\"prd\""
parameter_overrides = "Environment=\"prd\" AWSRegion=\"us-west-2\" CognitoUserPoolId=\"/<redacted>/prd/cognito/user_pool_id2\""
disable_rollback = false
resolve_s3 = true
image_repository="<redacted>.dkr.ecr.us-west-2.amazonaws.com/cognito-lambda"
@5t33 5t33 added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Mar 28, 2024
@hawflau
Copy link
Contributor

hawflau commented Mar 28, 2024

Hi @5t33 thanks for raising the issue. Can you help confirm from AWS Console that if a changeset is being created?
Also, can you run sam deploy with --debug flag and share the debug log?

@hawflau hawflau added blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. area/deploy sam deploy command stage/bug-repro The issue/bug needs to be reproduced and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Mar 28, 2024
@5t33
Copy link
Author

5t33 commented Mar 28, 2024

yeah, a change set is created each time. It says "REVIEW_IN_PROGRESS"

@5t33
Copy link
Author

5t33 commented Mar 28, 2024

Build Succeeded

Built Artifacts  : .aws-sam/build
Built Template   : .aws-sam/build/template.yaml

Commands you can use next
=========================
[*] Validate SAM template: sam validate
[*] Invoke Function: sam local invoke
[*] Test Function in the Cloud: sam sync --stack-name {{stack-name}} --watch
[*] Deploy: sam deploy --guided
aws-vault exec museflow-main-dev-admin -- sam deploy --config-env dev --debug
2024-03-28 18:13:06,614 | Config file location:                                               
/Users/stevenstaley/Documents/museflow.nosync/cognito-event-lambda/samconfig.toml             
2024-03-28 18:13:06,616 | Loading configuration values from [dev.['deploy'].parameters]       
(env.command_name.section) in config file at                                                  
'/Users/stevenstaley/Documents/museflow.nosync/cognito-event-lambda/samconfig.toml'...        
2024-03-28 18:13:06,616 | Configuration values successfully loaded.                           
2024-03-28 18:13:06,617 | Configuration values are: {'region': 'us-west-2', 'stack_name':     
'cognito-lambda-dev', 's3_prefix': 'cognito-lambda-dev', 'confirm_changeset': True,           
'capabilities': 'CAPABILITY_NAMED_IAM', 'tags': 'project="cognito-lambda" stage="dev"         
Environment="dev"', 'parameter_overrides': 'Environment="dev" AWSRegion="us-west-2"           
CognitoUserPoolId="/<redacted>/dev/cognito/user_pool_id2"', 'disable_rollback': False,          
'resolve_s3': True, 'image_repository':                                                       
'<redacted>.dkr.ecr.us-west-2.amazonaws.com/cognito-lambda'}                                
2024-03-28 18:13:06,622 | Using SAM Template at                                               
/Users/stevenstaley/Documents/museflow.nosync/cognito-event-lambda/.aws-sam/build/template.yam
l                                                                                             
2024-03-28 18:13:06,648 | Using config file: samconfig.toml, config environment: dev          
2024-03-28 18:13:06,648 | Expand command line arguments to:                                   
2024-03-28 18:13:06,649 |                                                                     
--template_file=/Users/stevenstaley/Documents/museflow.nosync/cognito-event-lambda/.aws-sam/bu
ild/template.yaml --fail_on_empty_changeset --confirm_changeset --on_failure=ROLLBACK         
--stack_name=cognito-lambda-dev                                                               
--image_repository=<redacted>.dkr.ecr.us-west-2.amazonaws.com/cognito-lambda                
--s3_prefix=cognito-lambda-dev --resolve_s3 --tags={'project': 'cognito-lambda', 'stage':     
'dev', 'Environment': 'dev'} --parameter_overrides={'Environment': 'dev', 'AWSRegion':        
'us-west-2', 'CognitoUserPoolId': '/museflow/dev/cognito/user_pool_id2'}                      
--capabilities=['CAPABILITY_NAMED_IAM']                                                       

                Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-1q2s0qzjmw7m4
                A different default S3 bucket can be set in samconfig.toml
                Or by specifying --s3-bucket explicitly.
2024-03-28 18:13:07,390 | Collected default values for parameters: {'LogLevel': 'info'}       
2024-03-28 18:13:07,412 | There is no customer defined id or cdk path defined for resource    
CognitoPreSignup, so we will use the resource logical id as the resource id                   
2024-03-28 18:13:07,413 | There is no customer defined id or cdk path defined for resource    
CognitoPreTokenGeneration, so we will use the resource logical id as the resource id          
2024-03-28 18:13:07,413 | There is no customer defined id or cdk path defined for resource    
LambdaInvokePermission, so we will use the resource logical id as the resource id             
2024-03-28 18:13:07,414 | There is no customer defined id or cdk path defined for resource    
CognitoLambdaRole, so we will use the resource logical id as the resource id                  
2024-03-28 18:13:07,414 | There is no customer defined id or cdk path defined for resource    
CognitoLambdaDLQ, so we will use the resource logical id as the resource id                   
2024-03-28 18:13:07,415 | There is no customer defined id or cdk path defined for resource    
CognitoLambdaLogs, so we will use the resource logical id as the resource id                  
2024-03-28 18:13:07,416 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambda is CognitoLambda                                        
2024-03-28 18:13:07,416 | There is no customer defined id or cdk path defined for resource    
AllowS3ToCallS3EventHandlerPermission, so we will use the resource logical id as the resource 
id                                                                                            
2024-03-28 18:13:07,417 | Unable to resolve property FunctionName: OrderedDict({'Fn::GetAtt': 
['CognitoLambda', 'Arn']}). Leaving as is.                                                    
2024-03-28 18:13:07,418 | 0 stacks found in the template                                      
2024-03-28 18:13:07,418 | Collected default values for parameters: {'LogLevel': 'info'}       
2024-03-28 18:13:07,429 | There is no customer defined id or cdk path defined for resource    
CognitoPreSignup, so we will use the resource logical id as the resource id                   
2024-03-28 18:13:07,429 | There is no customer defined id or cdk path defined for resource    
CognitoPreTokenGeneration, so we will use the resource logical id as the resource id          
2024-03-28 18:13:07,430 | There is no customer defined id or cdk path defined for resource    
LambdaInvokePermission, so we will use the resource logical id as the resource id             
2024-03-28 18:13:07,430 | There is no customer defined id or cdk path defined for resource    
CognitoLambdaRole, so we will use the resource logical id as the resource id                  
2024-03-28 18:13:07,431 | There is no customer defined id or cdk path defined for resource    
CognitoLambdaDLQ, so we will use the resource logical id as the resource id                   
2024-03-28 18:13:07,431 | There is no customer defined id or cdk path defined for resource    
CognitoLambdaLogs, so we will use the resource logical id as the resource id                  
2024-03-28 18:13:07,431 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambda is CognitoLambda                                        
2024-03-28 18:13:07,432 | There is no customer defined id or cdk path defined for resource    
AllowS3ToCallS3EventHandlerPermission, so we will use the resource logical id as the resource 
id                                                                                            
2024-03-28 18:13:07,432 | Unable to resolve property FunctionName: OrderedDict({'Fn::GetAtt': 
['CognitoLambda', 'Arn']}). Leaving as is.                                                    
2024-03-28 18:13:07,546 | There is no customer defined id or cdk path defined for resource    
CognitoPreSignup, so we will use the resource logical id as the resource id                   
2024-03-28 18:13:07,547 | There is no customer defined id or cdk path defined for resource    
CognitoPreTokenGeneration, so we will use the resource logical id as the resource id          
2024-03-28 18:13:07,548 | There is no customer defined id or cdk path defined for resource    
LambdaInvokePermission, so we will use the resource logical id as the resource id             
2024-03-28 18:13:07,548 | There is no customer defined id or cdk path defined for resource    
CognitoLambdaRole, so we will use the resource logical id as the resource id                  
2024-03-28 18:13:07,549 | There is no customer defined id or cdk path defined for resource    
CognitoLambdaDLQ, so we will use the resource logical id as the resource id                   
2024-03-28 18:13:07,549 | There is no customer defined id or cdk path defined for resource    
CognitoLambdaLogs, so we will use the resource logical id as the resource id                  
2024-03-28 18:13:07,549 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambda is CognitoLambda                                        
2024-03-28 18:13:07,550 | There is no customer defined id or cdk path defined for resource    
AllowS3ToCallS3EventHandlerPermission, so we will use the resource logical id as the resource 
id                                                                                            
2024-03-28 18:13:07,550 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoPreSignup is CognitoPreSignup                                  
2024-03-28 18:13:07,551 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoPreTokenGeneration is CognitoPreTokenGeneration                
2024-03-28 18:13:07,551 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource LambdaInvokePermission is LambdaInvokePermission                      
2024-03-28 18:13:07,552 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambdaRole is CognitoLambdaRole                                
2024-03-28 18:13:07,552 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambdaDLQ is CognitoLambdaDLQ                                  
2024-03-28 18:13:07,553 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambdaLogs is CognitoLambdaLogs                                
2024-03-28 18:13:07,553 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambda is CognitoLambda                                        
a36d8a52ae24: Layer already exists 
d584b8741e08: Layer already exists 
53b87099a601: Layer already exists 
9a000877459a: Layer already exists 
579823936cd8: Layer already exists 
7393ae547845: Layer already exists 
2d6640d0aba3: Layer already exists 
f8919a3b10e4: Layer already exists 
1d672e8b43a1: Layer already exists 
cognitolambda-56dac2f931b3-latest: digest: sha256:0d2da76832080ef90d88d9b469ad52801784caf644897bfe3c41a07880b5e674 size: 2205
2024-03-28 18:13:11,593 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource AllowS3ToCallS3EventHandlerPermission is                              
AllowS3ToCallS3EventHandlerPermission                                                         

        Deploying with following values
        ===============================
        Stack name                   : cognito-lambda-dev
        Region                       : us-west-2
        Confirm changeset            : True
        Disable rollback             : False
        Deployment image repository  : 
                                      <redacted>.dkr.ecr.us-west-2.amazonaws.com/cognito-lambda
        Deployment s3 bucket         : aws-sam-cli-managed-default-samclisourcebucket-1q2s0qzjmw7m4
        Capabilities                 : ["CAPABILITY_NAMED_IAM"]
        Parameter overrides          : {"Environment": "dev", "AWSRegion": "us-west-2", "CognitoUserPoolId": "/<redacted>/dev/cognito/user_pool_id2"}
        Signing Profiles             : {}

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

2024-03-28 18:13:11,630 | Collected default values for parameters: {'LogLevel': 'info'}       
2024-03-28 18:13:11,640 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoPreSignup is CognitoPreSignup                                  
2024-03-28 18:13:11,641 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoPreTokenGeneration is CognitoPreTokenGeneration                
2024-03-28 18:13:11,641 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource LambdaInvokePermission is LambdaInvokePermission                      
2024-03-28 18:13:11,641 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambdaRole is CognitoLambdaRole                                
2024-03-28 18:13:11,642 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambdaDLQ is CognitoLambdaDLQ                                  
2024-03-28 18:13:11,642 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambdaLogs is CognitoLambdaLogs                                
2024-03-28 18:13:11,642 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambda is CognitoLambda                                        
2024-03-28 18:13:11,642 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource AllowS3ToCallS3EventHandlerPermission is                              
AllowS3ToCallS3EventHandlerPermission                                                         
2024-03-28 18:13:11,643 | Unable to resolve property FunctionName: OrderedDict({'Fn::GetAtt': 
['CognitoLambda', 'Arn']}). Leaving as is.                                                    
2024-03-28 18:13:11,644 | 0 stacks found in the template                                      
2024-03-28 18:13:11,644 | Collected default values for parameters: {'LogLevel': 'info'}       
2024-03-28 18:13:11,652 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoPreSignup is CognitoPreSignup                                  
2024-03-28 18:13:11,653 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoPreTokenGeneration is CognitoPreTokenGeneration                
2024-03-28 18:13:11,653 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource LambdaInvokePermission is LambdaInvokePermission                      
2024-03-28 18:13:11,654 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambdaRole is CognitoLambdaRole                                
2024-03-28 18:13:11,654 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambdaDLQ is CognitoLambdaDLQ                                  
2024-03-28 18:13:11,654 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambdaLogs is CognitoLambdaLogs                                
2024-03-28 18:13:11,655 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource CognitoLambda is CognitoLambda                                        
2024-03-28 18:13:11,655 | Sam customer defined id is more priority than other IDs. Customer   
defined id for resource AllowS3ToCallS3EventHandlerPermission is                              
AllowS3ToCallS3EventHandlerPermission                                                         
2024-03-28 18:13:11,656 | Unable to resolve property FunctionName: OrderedDict({'Fn::GetAtt': 
['CognitoLambda', 'Arn']}). Leaving as is.                                                    
2024-03-28 18:13:11,656 | 8 resources found in the stack                                      
2024-03-28 18:13:11,657 | Found Serverless function with name='CognitoLambda' and             
ImageUri='<redacted>.dkr.ecr.us-west-2.amazonaws.com/cognito-lambda:cognitolambda-56dac2f931
b3-latest'                                                                                    
2024-03-28 18:13:11,657 | --base-dir is not presented, adjusting uri                          
/Users/stevenstaley/Documents/museflow.nosync/cognito-event-lambda relative to                
/var/folders/dr/jg_xf9yd3mq6m09mhzcyvklm0000gn/T/tmp7utvbvqk                                  
2024-03-28 18:13:11,657 | --base-dir is not presented, adjusting uri . relative to            
/var/folders/dr/jg_xf9yd3mq6m09mhzcyvklm0000gn/T/tmp7utvbvqk                                  
2024-03-28 18:13:12,604 | File with same data already exists at                               
cognito-lambda-dev/68d83b13d73d97fdfbfaae68f2560751.template, skipping upload                 


Waiting for changeset to be created..

@5t33
Copy link
Author

5t33 commented Mar 29, 2024

This is completely blocking me. Any updates?

@5t33
Copy link
Author

5t33 commented Mar 31, 2024

So I switched over to Terraform for this project to get unblocked. Although, I had to deploy a different project that I has taken down to lower costs and it deployed fine. So it's something about this config.

@hawflau
Copy link
Contributor

hawflau commented Apr 2, 2024

yeah, a change set is created each time. It says "REVIEW_IN_PROGRESS"

Just to confirm, is "REVIEW_IN_PROGRESS" the stack status or the change set status? I'm asking because I couldn't see "REVIEW_IN_PROGRESS" in my change sets during my attempts.

I notice you have these two resources with Type: Cognito in your templates:

  CognitoPreSignup:
    Type: Cognito
    Properties:
      UserPool: !Ref CognitoUserPoolId
      Trigger: PreSignUp
  CognitoPreTokenGeneration:
    Type: Cognito
    Properties:
      UserPool: !Ref CognitoUserPoolId
      Trigger: PreTokenGeneration

Is the Type actually Cognito?

@hawflau
Copy link
Contributor

hawflau commented Apr 2, 2024

I tried to add the resources with Type: Cognito and ran sam deploy. It got stuck at change set creation (change set stuck with status CREATE_IN_PROGRESS and stack stuck with status REVIEW_IN_PROGRESS). I believe that's the situation you saw. I couldn't find the exact resource type from https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_Cognito.html that matches the properties used. It seems to be a template issue to me.

@hawflau hawflau added type/question blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days and removed blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. stage/bug-repro The issue/bug needs to be reproduced labels Apr 2, 2024
@mildaniel
Copy link
Contributor

Closing due to inactivity.

Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy sam deploy command blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days type/question
Projects
None yet
Development

No branches or pull requests

3 participants