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 does not refresh #5109

Closed
simoroma opened this issue May 4, 2023 · 34 comments
Closed

sam deploy does not refresh #5109

simoroma opened this issue May 4, 2023 · 34 comments
Labels
area/deploy sam deploy command stage/waiting-for-release Fix has been merged to develop and is waiting for a release

Comments

@simoroma
Copy link

simoroma commented May 4, 2023

SAM deploy does not show if Cloudformation completes

Description:

sam deploy --guided gets stuck. It does not refresh.

{
  "version": "1.82.0",
  "system": {
    "python": "3.9.16",
    "os": "Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.23"
  },
  "additional_dependencies": {
    "docker_engine": "20.10.23",
    "aws_cdk": "Not available",
    "terraform": "1.1.6"
  }
}
@simoroma simoroma added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label May 4, 2023
@hnnasit
Copy link
Contributor

hnnasit commented May 4, 2023

Hi @simoroma, could you provide more details and steps for us to reproduce the issue? You can also run it with the --debug flag to get more LOGs and see where the command is getting stuck at.

@hnnasit hnnasit added blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels May 4, 2023
@simoroma
Copy link
Author

simoroma commented May 5, 2023

Thanks for the reply. This issue happens if I just do the following:

  • sam init and use the Hello World template in Python
  • sam deploy --guided --profile <my-profile>

The deployment works, but on the terminal it gets stuck here:

Previewing CloudFormation changeset before deployment
======================================================
Deploy this changeset? [y/N]: y

2023-05-05 13:35:40 - Waiting for stack create/update to complete

CloudFormation events from stack operations (refresh every 5.0 seconds)
---------------------------------------------------------------------------------------------------------------------------------------------------------
ResourceStatus                         ResourceType                           LogicalResourceId                      ResourceStatusReason                 
---------------------------------------------------------------------------------------------------------------------------------------------------------

@simoroma
Copy link
Author

simoroma commented May 5, 2023

I noticed that sometimes I get outputs. Not always.

So far I get outputs only when it rolls back.

@hnnasit hnnasit added area/deploy sam deploy command stage/bug-repro The issue/bug needs to be reproduced labels May 5, 2023
@moelasmar moelasmar added stage/needs-investigation Requires a deeper investigation and removed blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. labels May 23, 2023
@moelasmar
Copy link
Contributor

Hello @simoroma,
Could you please check your stack in AWS CloudFormation and make sure if it got stucked for any reason. Could you please also run sam deploy -g with --debug flag and share the full log with us.

@moelasmar moelasmar added blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days and removed stage/needs-investigation Requires a deeper investigation stage/bug-repro The issue/bug needs to be reproduced labels May 25, 2023
@simoroma
Copy link
Author

Thanks @moelasmar

sam deploy -g --debug --profile simone-anton
2023-05-26 10:03:40,624 | Config file location: /home/ialuronico/projects/anton/sam-classification-segmentation-nuxt/samconfig.toml           
2023-05-26 10:03:40,628 | Loading configuration values from [default.['deploy'].parameters] (env.command_name.section) in config file at      
'/home/ialuronico/projects/anton/sam-classification-segmentation-nuxt/samconfig.toml'...                                                      
2023-05-26 10:03:40,640 | Configuration values successfully loaded.                                                                           
2023-05-26 10:03:40,642 | Configuration values are: {'stack_name': 'sam-classification-segmentation-nuxt', 'capabilities': 'CAPABILITY_IAM',  
'confirm_changeset': True, 'resolve_s3': True, 's3_prefix': 'sam-classification-segmentation-nuxt', 'region': 'us-east-1', 'profile':         
'simone-anton', 'image_repositories': []}                                                                                                     
2023-05-26 10:03:40,660 | Using SAM Template at                                                                                               
/home/ialuronico/projects/anton/sam-classification-segmentation-nuxt/.aws-sam/build/template.yaml                                             
2023-05-26 10:03:40,749 | Using config file: samconfig.toml, config environment: default                                                      
2023-05-26 10:03:40,751 | Expand command line arguments to:                                                                                   
2023-05-26 10:03:40,753 | --guided                                                                                                            
--template_file=/home/ialuronico/projects/anton/sam-classification-segmentation-nuxt/.aws-sam/build/template.yaml --fail_on_empty_changeset   
--confirm_changeset --on_failure=ROLLBACK --stack_name=sam-classification-segmentation-nuxt --s3_prefix=sam-classification-segmentation-nuxt  
--resolve_s3 --capabilities=['CAPABILITY_IAM']                                                                                                
2023-05-26 10:03:41,089 | There is no customer defined id or cdk path defined for resource ServerlessRestApiClassSegNuxt, so we will use the  
resource logical id as the resource id                                                                                                        
2023-05-26 10:03:41,090 | There is no customer defined id or cdk path defined for resource ApiKeyClassSegNuxt, so we will use the resource    
logical id as the resource id                                                                                                                 
2023-05-26 10:03:41,092 | There is no customer defined id or cdk path defined for resource ApiUsagePlanClassSegNuxt, so we will use the       
resource logical id as the resource id                                                                                                        
2023-05-26 10:03:41,093 | There is no customer defined id or cdk path defined for resource ApiUsagePlanKeyClassSegNuxt, so we will use the    
resource logical id as the resource id                                                                                                        
2023-05-26 10:03:41,095 | Sam customer defined id is more priority than other IDs. Customer defined id for resource                           
ClassificationSegmentationNuxtFunction is ClassificationSegmentationNuxtFunction                                                              

Configuring SAM deploy
======================

        Looking for config file [samconfig.toml] :  Found
        Reading default arguments  :  Success

        Setting default arguments for 'sam deploy'
        =========================================
        Stack Name [sam-classification-segmentation-nuxt]: 
        AWS Region [us-east-1]: 
2023-05-26 10:04:03,468 | No Parameters detected in the template                                                                                        
2023-05-26 10:04:03,528 | There is no customer defined id or cdk path defined for resource ServerlessRestApiClassSegNuxt, so we will use the resource   
logical id as the resource id                                                                                                                           
2023-05-26 10:04:03,529 | There is no customer defined id or cdk path defined for resource ApiKeyClassSegNuxt, so we will use the resource logical id as
the resource id                                                                                                                                         
2023-05-26 10:04:03,531 | There is no customer defined id or cdk path defined for resource ApiUsagePlanClassSegNuxt, so we will use the resource logical
id as the resource id                                                                                                                                   
2023-05-26 10:04:03,536 | There is no customer defined id or cdk path defined for resource ApiUsagePlanKeyClassSegNuxt, so we will use the resource     
logical id as the resource id                                                                                                                           
2023-05-26 10:04:03,537 | Sam customer defined id is more priority than other IDs. Customer defined id for resource                                     
ClassificationSegmentationNuxtFunction is ClassificationSegmentationNuxtFunction                                                                        
2023-05-26 10:04:03,542 | 0 stacks found in the template                                                                                                
        #Shows you resources changes to be deployed and require a 'Y' to initiate deploy
        Confirm changes before deploy [Y/n]: 
        #SAM needs permission to be able to create roles to connect to the resources in your template
        Allow SAM CLI IAM role creation [Y/n]: 
        #Preserves the state of previously provisioned resources when an operation fails
        Disable rollback [y/N]: 
2023-05-26 10:04:16,206 | No Parameters detected in the template                                                                                        
2023-05-26 10:04:16,240 | There is no customer defined id or cdk path defined for resource ServerlessRestApiClassSegNuxt, so we will use the resource   
logical id as the resource id                                                                                                                           
2023-05-26 10:04:16,241 | There is no customer defined id or cdk path defined for resource ApiKeyClassSegNuxt, so we will use the resource logical id as
the resource id                                                                                                                                         
2023-05-26 10:04:16,242 | There is no customer defined id or cdk path defined for resource ApiUsagePlanClassSegNuxt, so we will use the resource logical
id as the resource id                                                                                                                                   
2023-05-26 10:04:16,243 | There is no customer defined id or cdk path defined for resource ApiUsagePlanKeyClassSegNuxt, so we will use the resource     
logical id as the resource id                                                                                                                           
2023-05-26 10:04:16,247 | Sam customer defined id is more priority than other IDs. Customer defined id for resource                                     
ClassificationSegmentationNuxtFunction is ClassificationSegmentationNuxtFunction                                                                        
2023-05-26 10:04:16,251 | 5 resources found in the stack                                                                                                
2023-05-26 10:04:16,254 | Found Serverless function with name='ClassificationSegmentationNuxtFunction' and                                              
CodeUri='ClassificationSegmentationNuxtFunction'                                                                                                        
2023-05-26 10:04:16,258 | --base-dir is not presented, adjusting uri ClassificationSegmentationNuxtFunction relative to                                 
/home/ialuronico/projects/anton/sam-classification-segmentation-nuxt/.aws-sam/build/template.yaml                                                       
2023-05-26 10:04:16,262 | 5 resources found in the stack                                                                                                
2023-05-26 10:04:16,265 | Found Serverless function with name='ClassificationSegmentationNuxtFunction' and                                              
CodeUri='ClassificationSegmentationNuxtFunction'                                                                                                        
2023-05-26 10:04:16,267 | --base-dir is not presented, adjusting uri ClassificationSegmentationNuxtFunction relative to                                 
/home/ialuronico/projects/anton/sam-classification-segmentation-nuxt/.aws-sam/build/template.yaml                                                       
2023-05-26 10:04:16,271 | No function or layer definition found with code sign config, skipping                                                         
        Save arguments to configuration file [Y/n]: 
        SAM configuration file [samconfig.toml]: 
        SAM configuration environment [default]: 

        Looking for resources needed for deployment:

        Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-1pu320hh8k89o
        A different default S3 bucket can be set in samconfig.toml and auto resolution of buckets turned off by setting resolve_s3=False
2023-05-26 10:04:23,314 | 5 resources found in the stack                                                                                                
2023-05-26 10:04:23,315 | Found Serverless function with name='ClassificationSegmentationNuxtFunction' and                                              
CodeUri='ClassificationSegmentationNuxtFunction'                                                                                                        
2023-05-26 10:04:23,317 | --base-dir is not presented, adjusting uri ClassificationSegmentationNuxtFunction relative to                                 
/home/ialuronico/projects/anton/sam-classification-segmentation-nuxt/.aws-sam/build/template.yaml                                                       
2023-05-26 10:04:24,455 |                                                                                                                               
        Parameter "stack_name=sam-classification-segmentation-nuxt" in [default.deploy.parameters] is defined as a global parameter                     
[default.global.parameters].                                                                                                                            
        This parameter will be only saved under [default.global.parameters] in                                                                          
/home/ialuronico/projects/anton/sam-classification-segmentation-nuxt/samconfig.toml.                                                                    

        Saved arguments to config file
        Running 'sam deploy' for future deployments will use the parameters saved above.
        The above parameters can be changed by modifying samconfig.toml
        Learn more about samconfig.toml syntax at 
        https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html

2023-05-26 10:04:24,484 | No Parameters detected in the template                                                                                        
2023-05-26 10:04:24,517 | There is no customer defined id or cdk path defined for resource ServerlessRestApiClassSegNuxt, so we will use the resource   
logical id as the resource id                                                                                                                           
2023-05-26 10:04:24,518 | There is no customer defined id or cdk path defined for resource ApiKeyClassSegNuxt, so we will use the resource logical id as
the resource id                                                                                                                                         
2023-05-26 10:04:24,521 | There is no customer defined id or cdk path defined for resource ApiUsagePlanClassSegNuxt, so we will use the resource logical
id as the resource id                                                                                                                                   
2023-05-26 10:04:24,528 | There is no customer defined id or cdk path defined for resource ApiUsagePlanKeyClassSegNuxt, so we will use the resource     
logical id as the resource id                                                                                                                           
2023-05-26 10:04:24,530 | Sam customer defined id is more priority than other IDs. Customer defined id for resource                                     
ClassificationSegmentationNuxtFunction is ClassificationSegmentationNuxtFunction                                                                        
2023-05-26 10:04:24,533 | 0 stacks found in the template                                                                                                
2023-05-26 10:04:24,535 | No Parameters detected in the template                                                                                        
2023-05-26 10:04:24,583 | There is no customer defined id or cdk path defined for resource ServerlessRestApiClassSegNuxt, so we will use the resource   
logical id as the resource id                                                                                                                           
2023-05-26 10:04:24,584 | There is no customer defined id or cdk path defined for resource ApiKeyClassSegNuxt, so we will use the resource logical id as
the resource id                                                                                                                                         
2023-05-26 10:04:24,585 | There is no customer defined id or cdk path defined for resource ApiUsagePlanClassSegNuxt, so we will use the resource logical
id as the resource id                                                                                                                                   
2023-05-26 10:04:24,588 | There is no customer defined id or cdk path defined for resource ApiUsagePlanKeyClassSegNuxt, so we will use the resource     
logical id as the resource id                                                                                                                           
2023-05-26 10:04:24,591 | Sam customer defined id is more priority than other IDs. Customer defined id for resource                                     
ClassificationSegmentationNuxtFunction is ClassificationSegmentationNuxtFunction                                                                        
2023-05-26 10:04:24,637 | There is no customer defined id or cdk path defined for resource ServerlessRestApiClassSegNuxt, so we will use the resource   
logical id as the resource id                                                                                                                           
2023-05-26 10:04:24,640 | There is no customer defined id or cdk path defined for resource ApiKeyClassSegNuxt, so we will use the resource logical id as
the resource id                                                                                                                                         
2023-05-26 10:04:24,647 | There is no customer defined id or cdk path defined for resource ApiUsagePlanClassSegNuxt, so we will use the resource logical
id as the resource id                                                                                                                                   
2023-05-26 10:04:24,648 | There is no customer defined id or cdk path defined for resource ApiUsagePlanKeyClassSegNuxt, so we will use the resource     
logical id as the resource id                                                                                                                           
2023-05-26 10:04:24,650 | Sam customer defined id is more priority than other IDs. Customer defined id for resource                                     
ClassificationSegmentationNuxtFunction is ClassificationSegmentationNuxtFunction                                                                        
2023-05-26 10:04:24,652 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ServerlessRestApiClassSegNuxt is    
ServerlessRestApiClassSegNuxt                                                                                                                           
2023-05-26 10:04:24,656 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ApiKeyClassSegNuxt is               
ApiKeyClassSegNuxt                                                                                                                                      
2023-05-26 10:04:24,659 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ApiUsagePlanClassSegNuxt is         
ApiUsagePlanClassSegNuxt                                                                                                                                
2023-05-26 10:04:24,662 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ApiUsagePlanKeyClassSegNuxt is      
ApiUsagePlanKeyClassSegNuxt                                                                                                                             
2023-05-26 10:04:24,664 | Sam customer defined id is more priority than other IDs. Customer defined id for resource                                     
ClassificationSegmentationNuxtFunction is ClassificationSegmentationNuxtFunction                                                                        
        Uploading to sam-classification-segmentation-nuxt/e67afbdf1b8dc6880849c8971b35f116  26086836 / 26086836  (100.00%)

        Deploying with following values
        ===============================
        Stack name                   : sam-classification-segmentation-nuxt
        Region                       : us-east-1
        Confirm changeset            : True
        Disable rollback             : False
        Deployment s3 bucket         : aws-sam-cli-managed-default-samclisourcebucket-1pu320hh8k89o
        Capabilities                 : ["CAPABILITY_IAM"]
        Parameter overrides          : {}
        Signing Profiles             : {}

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

2023-05-26 10:04:33,887 | No Parameters detected in the template                                                                                        
2023-05-26 10:04:33,914 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ServerlessRestApiClassSegNuxt is    
ServerlessRestApiClassSegNuxt                                                                                                                           
2023-05-26 10:04:33,916 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ApiKeyClassSegNuxt is               
ApiKeyClassSegNuxt                                                                                                                                      
2023-05-26 10:04:33,918 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ApiUsagePlanClassSegNuxt is         
ApiUsagePlanClassSegNuxt                                                                                                                                
2023-05-26 10:04:33,922 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ApiUsagePlanKeyClassSegNuxt is      
ApiUsagePlanKeyClassSegNuxt                                                                                                                             
2023-05-26 10:04:33,925 | Sam customer defined id is more priority than other IDs. Customer defined id for resource                                     
ClassificationSegmentationNuxtFunction is ClassificationSegmentationNuxtFunction                                                                        
2023-05-26 10:04:33,927 | 0 stacks found in the template                                                                                                
2023-05-26 10:04:33,929 | No Parameters detected in the template                                                                                        
2023-05-26 10:04:33,963 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ServerlessRestApiClassSegNuxt is    
ServerlessRestApiClassSegNuxt                                                                                                                           
2023-05-26 10:04:33,965 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ApiKeyClassSegNuxt is               
ApiKeyClassSegNuxt                                                                                                                                      
2023-05-26 10:04:33,967 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ApiUsagePlanClassSegNuxt is         
ApiUsagePlanClassSegNuxt                                                                                                                                
2023-05-26 10:04:33,970 | Sam customer defined id is more priority than other IDs. Customer defined id for resource ApiUsagePlanKeyClassSegNuxt is      
ApiUsagePlanKeyClassSegNuxt                                                                                                                             
2023-05-26 10:04:33,973 | Sam customer defined id is more priority than other IDs. Customer defined id for resource                                     
ClassificationSegmentationNuxtFunction is ClassificationSegmentationNuxtFunction                                                                        
2023-05-26 10:04:33,979 | 5 resources found in the stack                                                                                                
        Uploading to sam-classification-segmentation-nuxt/e535f5675fbf9b5b924409c88c91e5bb.template  3529 / 3529  (100.00%)


Waiting for changeset to be created..

CloudFormation stack changeset
-----------------------------------------------------------------------------------------------------------------------------------------
Operation                          LogicalResourceId                  ResourceType                       Replacement                      
-----------------------------------------------------------------------------------------------------------------------------------------
* Modify                           ClassificationSegmentationNuxtFu   AWS::Lambda::Function              False                            
                                   nction                                                                                                 
* Modify                           ServerlessRestApiClassSegNuxt      AWS::ApiGateway::RestApi           False                            
-----------------------------------------------------------------------------------------------------------------------------------------


Changeset created successfully. arn:aws:cloudformation:us-east-1:646854631039:changeSet/samcli-deploy1685084674/23b9ea22-c159-4a37-ad08-d12b51306341


Previewing CloudFormation changeset before deployment
======================================================
Deploy this changeset? [y/N]: y

2023-05-26 10:04:56 - Waiting for stack create/update to complete

CloudFormation events from stack operations (refresh every 5.0 seconds)
-----------------------------------------------------------------------------------------------------------------------------------------
ResourceStatus                     ResourceType                       LogicalResourceId                  ResourceStatusReason             
-----------------------------------------------------------------------------------------------------------------------------------------

And this is what I get on the console:
cloudformation

I also updated SAM, sam --info:

{
  "version": "1.84.0",
  "system": {
    "python": "3.9.16",
    "os": "Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.23"
  },
  "additional_dependencies": {
    "docker_engine": "23.0.5",
    "aws_cdk": "Not available",
    "terraform": "1.1.6"
  },
  "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"
  ]
}

@moelasmar
Copy link
Contributor

so it seems the stack got updated successfully, but there is no update in SAM CLI logs.
Do you receive any exception if you left it for longer time??
Also, Please share your template, and if you can share your project in some Github repository, it will be really helpful.

@simoroma
Copy link
Author

simoroma commented May 26, 2023 via email

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

Ok, thanks @simoroma for raising this issue. We will try to investigate this issue and update you.

@moelasmar
Copy link
Contributor

Hello @simoroma, are you using SAM CLI in a docker inside windows machine?

@simoroma
Copy link
Author

I am using sam with WSL2. I use Visual Studio Code and connect to the terminal though that.

@moelasmar
Copy link
Contributor

just to confirm, is SAM CLI run inside the container, or you mean that you are using WSL2 Docker to run the Lambda emulators locally?

@simoroma
Copy link
Author

simoroma commented May 29, 2023 via email

@moelasmar
Copy link
Contributor

Ok got it, you are running SAM remotely in WSL2 environment. Can I ask you to try sam deploy locally in your machine and see if you will face the same issues.

@simoroma
Copy link
Author

Unfortunately still the same. I also tried with another project. Everything goes well but it gets stuck at the results.

@lucashuy
Copy link
Contributor

Hi, sorry about the delay in response. I am unable to replicate the same behaviour in WSL2 using VSCode's remote functionality to connect to the local WSL2 install from my Windows 10 install. This was tested with version 1.88.0 installed via the Linux zip file noted in our install guide. Are you still experiencing this problem with the latest version of SAM CLI?

@lucashuy lucashuy added the blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. label Jun 26, 2023
@simoroma
Copy link
Author

No worries. Thanks for the help anyway.

Yes still the same issue unfortunately with 1.88.0. To install it I use pip install aws-sam-cli with Anaconda. I am also using Windows 11.

It is weird because at deployment time it gets stuck waiting for results. Though, if I cancel the Cloudformation job sometimes I get some output with SAM too.

@moelasmar
Copy link
Contributor

Thanks @simoroma for your response, two more points we need to check:

  • Is there any old sam cli that was working for you before
  • Installing SAM CLI using pip sometimes causes issues because of the dependencies, and we do not recommend it. Can you try one of the installations methods mentioned in our docs, and let us know if you still have the same issue.

@simoroma
Copy link
Author

Hi @moelasmar

Unfortunately, still same issues.

I don't recall having a version of SAM working. I had a previous installation of SAM through the procedure from the docs. Nonetheless, in my conda environments I was always installing SAM through pip. Anyway, I uninstalled it and installed 1.89.00 with the docs' procedure. It still does not show a output.

It is so weird that just sometimes I see the output. I recall seeing it when I cancel the deployment. But just sometimes.

@moelasmar
Copy link
Contributor

Hello @simoroma,
as we are not able to reproduce this issue, is it possible to have a call to try to do some investigations in your setup to get more information about the root cause of this problem?

@simoroma
Copy link
Author

simoroma commented Jul 5, 2023

Sure! However, I am going to be available after the middle of July. Could you write me an email at [email protected] so that we can schedule the call? Thanks again.

@moelasmar
Copy link
Contributor

Hello @simoroma,
Could you please use the artifacts created here to install SAM CLI version with some debugging logs, and try your use case using the --debug flag, and share the logs with us to investigate more.

@simoroma
Copy link
Author

sam-beta deploy --debug
2023-08-29 10:29:24,061 | Config file location: /home/ialuronico/test/sam-test-bug/samconfig.toml                                                                
2023-08-29 10:29:24,069 | Loading configuration values from [default.['deploy'].parameters] (env.command_name.section) in config file at                         
'/home/ialuronico/test/sam-test-bug/samconfig.toml'...                                                                                                           
2023-08-29 10:29:24,071 | Configuration values successfully loaded.                                                                                              
2023-08-29 10:29:24,073 | Configuration values are: {'stack_name': 'sam-test-bug', 'capabilities': 'CAPABILITY_IAM', 'confirm_changeset': True, 'resolve_s3':    
True, 's3_prefix': 'sam-test-bug', 'region': 'us-east-1', 'image_repositories': []}                                                                              
2023-08-29 10:29:24,086 | Using SAM Template at /home/ialuronico/test/sam-test-bug/.aws-sam/build/template.yaml                                                  
2023-08-29 10:29:24,181 | Using config file: samconfig.toml, config environment: default                                                                         
2023-08-29 10:29:24,183 | Expand command line arguments to:                                                                                                      
2023-08-29 10:29:24,185 | --template_file=/home/ialuronico/test/sam-test-bug/.aws-sam/build/template.yaml --fail_on_empty_changeset --confirm_changeset          
--on_failure=ROLLBACK --stack_name=sam-test-bug --s3_prefix=sam-test-bug --resolve_s3 --capabilities=['CAPABILITY_IAM']                                          

                Managed S3 bucket: aws-sam-cli-managed-default-samclisourcebucket-1x8yppx484uod
                A different default S3 bucket can be set in samconfig.toml
                Or by specifying --s3-bucket explicitly.
2023-08-29 10:29:25,245 | No Parameters detected in the template                                                                                                 
2023-08-29 10:29:25,284 | Sam customer defined id is more priority than other IDs. Customer defined id for resource HelloWorldFunction is HelloWorldFunction     
2023-08-29 10:29:25,287 | 0 stacks found in the template                                                                                                         
2023-08-29 10:29:25,288 | No Parameters detected in the template                                                                                                 
2023-08-29 10:29:25,329 | Sam customer defined id is more priority than other IDs. Customer defined id for resource HelloWorldFunction is HelloWorldFunction     
2023-08-29 10:29:25,473 | Sam customer defined id is more priority than other IDs. Customer defined id for resource HelloWorldFunction is HelloWorldFunction     
2023-08-29 10:29:25,474 | Sam customer defined id is more priority than other IDs. Customer defined id for resource HelloWorldFunction is HelloWorldFunction     
2023-08-29 10:29:26,055 | File with same data already exists at sam-test-bug/9438a1e592edfdc2fd28cc1b331d76ea, skipping upload                                   

        Deploying with following values
        ===============================
        Stack name                   : sam-test-bug
        Region                       : us-east-1
        Confirm changeset            : True
        Disable rollback             : False
        Deployment s3 bucket         : aws-sam-cli-managed-default-samclisourcebucket-1x8yppx484uod
        Capabilities                 : ["CAPABILITY_IAM"]
        Parameter overrides          : {}
        Signing Profiles             : {}

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

2023-08-29 10:29:26,077 | No Parameters detected in the template                                                                                                 
2023-08-29 10:29:26,100 | Sam customer defined id is more priority than other IDs. Customer defined id for resource HelloWorldFunction is HelloWorldFunction     
2023-08-29 10:29:26,102 | 0 stacks found in the template                                                                                                         
2023-08-29 10:29:26,103 | No Parameters detected in the template                                                                                                 
2023-08-29 10:29:26,122 | Sam customer defined id is more priority than other IDs. Customer defined id for resource HelloWorldFunction is HelloWorldFunction     
2023-08-29 10:29:26,125 | 1 resources found in the stack                                                                                                         
2023-08-29 10:29:26,591 | Stack with id sam-test-bug does not exist                                                                                              
2023-08-29 10:29:27,070 | File with same data already exists at sam-test-bug/3ac137669f349e117f7d1e74ed111b32.template, skipping upload                          


Waiting for changeset to be created..

CloudFormation stack changeset
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Operation                               LogicalResourceId                       ResourceType                            Replacement                           
-------------------------------------------------------------------------------------------------------------------------------------------------------------
+ Add                                   HelloWorldFunction                      AWS::Lambda::Function                   N/A                                   
-------------------------------------------------------------------------------------------------------------------------------------------------------------


Changeset created successfully. arn:aws:cloudformation:us-east-1:207258596458:changeSet/samcli-deploy1693294166/a94456bf-2ed6-475f-988b-6d8eb78f7352


Previewing CloudFormation changeset before deployment
======================================================
Deploy this changeset? [y/N]: y

2023-08-29 10:29:36 - Waiting for stack create/update to complete

CloudFormation events from stack operations (refresh every 5.0 seconds)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
ResourceStatus                          ResourceType                            LogicalResourceId                       ResourceStatusReason                  
-------------------------------------------------------------------------------------------------------------------------------------------------------------
2023-08-29 10:29:36,800 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:29:41,957 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:29:41,965 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:29:47,119 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:29:47,121 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:29:52,265 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:29:52,267 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:29:57,417 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:29:57,419 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:02,574 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:02,577 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:07,717 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:07,719 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:12,898 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:12,900 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:18,054 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:18,057 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:23,234 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:23,241 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:28,399 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:28,401 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:33,559 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:33,566 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:38,716 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:38,720 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:43,857 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:43,859 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:49,008 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:49,011 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:54,156 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:54,157 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:30:59,309 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:30:59,314 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:31:04,465 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:31:04,470 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:31:09,622 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:31:09,625 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:31:14,781 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:31:14,793 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:31:19,937 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:31:19,939 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:31:25,089 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd',      
'EventId': '51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                       
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack',           
'Timestamp': datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following  
resource(s) failed to create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                
2023-08-29 10:31:25,093 | Trail # 0 to get the stack sam-test-bug create events                                                                                  
2023-08-29 10:31:30,256 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following resource(s) failed to     
create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                                                  
2023-08-29 10:31:30,259 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:31:35,420 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following resource(s) failed to     
create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                                                  
2023-08-29 10:31:35,423 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:31:40,566 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following resource(s) failed to     
create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                                                  
2023-08-29 10:31:40,573 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:31:45,722 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following resource(s) failed to     
create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                                                  
2023-08-29 10:31:45,724 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:31:50,877 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'51dafec0-463d-11ee-aca1-0ee52e61c8a5', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 26, 7, 521000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_IN_PROGRESS', 'ResourceStatusReason': 'The following resource(s) failed to     
create: [HelloWorldFunction]. Rollback requested by user.'}                                                                                                                  
2023-08-29 10:31:50,879 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:31:56,036 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:31:56,038 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:01,187 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:01,189 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:06,339 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:06,341 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:11,489 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:11,492 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:16,640 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:16,642 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:21,788 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:21,790 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:26,939 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:26,941 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:32,097 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:32,099 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:37,256 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:37,258 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:42,414 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:42,416 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:47,566 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:47,568 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:52,712 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:52,715 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:32:57,882 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:32:57,884 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:33:03,051 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:33:03,055 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:33:08,276 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:33:08,322 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:33:13,470 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:33:13,472 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:33:18,617 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:33:18,619 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:33:24,138 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:33:24,140 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:33:29,288 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:33:29,291 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:33:34,457 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:33:34,462 | Trail # 0 to get the stack sam-test-bug create events                                                                                              
2023-08-29 10:33:39,623 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'EventId':       
'a24563f0-463d-11ee-990f-0eefc86095cb', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId':                                              
'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/4a5296e0-463d-11ee-a888-0a36dcda52bd', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp':          
datetime.datetime(2023, 8, 29, 7, 28, 22, 435000, tzinfo=tzutc()), 'ResourceStatus': 'ROLLBACK_COMPLETE'}                                                                    
2023-08-29 10:33:39,625 | Trail # 0 to get the stack sam-test-bug create events  

I have to type CTRL+C to Abort because the output does not change anymore. The AWS Console shows ROLLBACK_COMPLETE

@rodrigomartin
Copy link

Same issue here

  • SO: Manjaro
  • SAM CLI version: 1.95.0

@moelasmar
Copy link
Contributor

thanks @simoroma for checking it.
It seems the code is some how stucking in this loop

for event_items in response_iterator:
for event in event_items["StackEvents"]:
LOG.debug("Stack Event: %s", event)
# Skip already shown old event entries or former deployments
if utc_to_timestamp(event["Timestamp"]) <= time_stamp_marker:
break
if event["EventId"] not in events:
events.add(event["EventId"])
# Events are in reverse chronological order
# Pushing in front reverse the order to display older events first
new_events.appendleft(event)
else: # go to next loop (page of events) if not break from inside loop
continue
break # reached here only if break from inner loop!

I added more logs to know why the code is stucking in this loop, please use the artifacts created here and rerun the deploy command again and share the logs with us.

could you also set the environment variable SAM_CLI_POLL_DELAY to 0.5 or 1, as I think that there are some missed events, as the first even I can see is ROLLBACK_IN_PROGRESS and I should see some create events before it.

@simoroma
Copy link
Author

I ran sam-beta deploy --debug --no-confirm-changeset &> output.txt
output.txt

@rodrigomartin
Copy link

thanks @simoroma for checking it. It seems the code is some how stucking in this loop

for event_items in response_iterator:
for event in event_items["StackEvents"]:
LOG.debug("Stack Event: %s", event)
# Skip already shown old event entries or former deployments
if utc_to_timestamp(event["Timestamp"]) <= time_stamp_marker:
break
if event["EventId"] not in events:
events.add(event["EventId"])
# Events are in reverse chronological order
# Pushing in front reverse the order to display older events first
new_events.appendleft(event)
else: # go to next loop (page of events) if not break from inside loop
continue
break # reached here only if break from inner loop!

I added more logs to know why the code is stucking in this loop, please use the artifacts created here and rerun the deploy command again and share the logs with us.

could you also set the environment variable SAM_CLI_POLL_DELAY to 0.5 or 1, as I think that there are some missed events, as the first even I can see is ROLLBACK_IN_PROGRESS and I should see some create events before it.

isn't that "else" badly indented?

@moelasmar
Copy link
Contributor

@simoroma, the following snippet is from the logs you sent

2023-08-30 10:10:25,016 | Trail # 0 to get the stack sam-test-bug create events
2023-08-30 10:10:26,184 | Stack Event: {'StackId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/b60244a0-4703-11ee-b72c-0a5f22ece6d1', 'EventId': 'cafac490-4703-11ee-bbd0-0e26f9e7020d', 'StackName': 'sam-test-bug', 'LogicalResourceId': 'sam-test-bug', 'PhysicalResourceId': 'arn:aws:cloudformation:us-east-1:207258596458:stack/sam-test-bug/b60244a0-4703-11ee-b72c-0a5f22ece6d1', 'ResourceType': 'AWS::CloudFormation::Stack', 'Timestamp': datetime.datetime(2023, 8, 30, 7, 6, 51, 90000, tzinfo=tzutc()), 'ResourceStatus': 'CREATE_IN_PROGRESS', 'ResourceStatusReason': 'User Initiated'}
2023-08-30 10:10:26,184 | time_stamp_marker: 2023-08-30 07:10:25.016000
2023-08-30 10:10:26,185 | event time stamp: 2023-08-30 07:06:51.090000+00:00
2023-08-30 10:10:26,185 | Skip previous event as time_stamp_marker: 2023-08-30 07:10:25.016000 is before than event time stamp: 2023-08-30 07:06:51.090000+00:00
2023-08-30 10:10:26,185 | Exit from the describe event loop

The problem is time_stamp_marker is always after all the events timestamp returning from CFN service, so SAM CLI deals with these events as old events that it already read them and so, it ignores them. This how SAM CLI initially set this marker value

self.describe_stack_events(stack_name, time.time() * 1000, on_failure)

so I believe the problem is the time in WSL is not in sync with the actual time, and it is after it by around 3 mins, and this cause that SAM CLI stucks.

Regarding why things got rollback, it is still not clear from the logs why it is rolling back, but may be after we fix the first problem, we can find more logs to get the second problem.

@moelasmar
Copy link
Contributor

@simoroma,
I did some updates in SAM CLI to use the first event as the time stamp maker instead of the customer's machine time. Could you please the artifacts generated here, and retest again, and share the logs with us.

@moelasmar
Copy link
Contributor

thanks @simoroma for checking it. It seems the code is some how stucking in this loop

for event_items in response_iterator:
for event in event_items["StackEvents"]:
LOG.debug("Stack Event: %s", event)
# Skip already shown old event entries or former deployments
if utc_to_timestamp(event["Timestamp"]) <= time_stamp_marker:
break
if event["EventId"] not in events:
events.add(event["EventId"])
# Events are in reverse chronological order
# Pushing in front reverse the order to display older events first
new_events.appendleft(event)
else: # go to next loop (page of events) if not break from inside loop
continue
break # reached here only if break from inner loop!

I added more logs to know why the code is stucking in this loop, please use the artifacts created here and rerun the deploy command again and share the logs with us.
could you also set the environment variable SAM_CLI_POLL_DELAY to 0.5 or 1, as I think that there are some missed events, as the first even I can see is ROLLBACK_IN_PROGRESS and I should see some create events before it.

isn't that "else" badly indented?

No

@simoroma
Copy link
Author

@moelasmar Good catch! Now the SAM terminates! Don't worry about the roll backs. I haven't set up roles properly. I had this issue also when Cloud Formation stacks completed correctly.
output.txt

@moelasmar
Copy link
Contributor

Thanks @simoroma, I will try to see if my change will not impact other usages, and commit to SAM CLI.

@sriram-mv
Copy link
Contributor

Draft PR in the works: #5852

@sriram-mv sriram-mv 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 Sep 26, 2023
@moelasmar moelasmar added blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days and removed blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days labels Oct 23, 2023
@FelipeRavaCardona
Copy link

I am getting the same problem as @simoroma, is there a possibility that a new update broke it again? I have already tried to remove SAM completely and reinstall it, but i have had no success so far.
I am using windows cmd and the deploy is stuck at this screen:
image

@super132 super132 added the stage/waiting-for-release Fix has been merged to develop and is waiting for a release label Oct 30, 2023
@github-actions
Copy link
Contributor

Patch is released in v1.100.0. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy sam deploy command stage/waiting-for-release Fix has been merged to develop and is waiting for a release
Projects
None yet
Development

No branches or pull requests

8 participants