This step uses AWS CLI to reference an coffee-sls-OrderCreatedHandler function that has not been deployed previously, and obviously fails.
Instructions do not clearly mention the need for the user to commit changes and git push -u origin master is required. This then triggers the CodeBuild project, thereby deploying the Lambda function. This could be an error prone step for many users.
[Container] 2021/09/27 05:16:41 Running command sam deploy --template-file ./packaged.yaml --stack-name coffee-sls --capabilities CAPABILITY_IAM
Deploying with following values
===============================
Stack name : coffee-sls
Region : None
Confirm changeset : False
Deployment s3 bucket : None
Capabilities : ["CAPABILITY_IAM"]
Parameter overrides : {}
Initiating deployment
=====================
AcceptOrderFunction may not have authorization defined.
Waiting for changeset to be created..
Error: Failed to create changeset for the stack: coffee-sls, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Template error: instance of Fn::GetAtt references undefined resource AcceptOrder
[Container] 2021/09/27 05:16:48 Command did not exit successfully sam deploy --template-file ./packaged.yaml --stack-name coffee-sls --capabilities CAPABILITY_IAM exit status 1
[Container] 2021/09/27 05:16:48 Phase complete: POST_BUILD State: FAILED
[Container] 2021/09/27 05:16:48 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: sam deploy --template-file ./packaged.yaml --stack-name coffee-sls --capabilities CAPABILITY_IAM. Reason: exit status 1