Closed 5t33 closed 6 months ago
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?
yeah, a change set is created each time. It says "REVIEW_IN_PROGRESS"
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..
This is completely blocking me. Any updates?
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.
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
?
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.
Closing due to inactivity.
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.
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:
Expected result:
a deployment.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 1.113.0Add --debug flag to command you are running
template:
samconfig.toml