Use the AWS CLI to invoke the Lambda function. The function name is in the outputs of the AWS SAM deployment (the key is QueuePublisherFunction):
1. Invoke the Lambda function to publish a message to the SQS queue: aws lambda invoke --function-name ENTER_YOUR_FUNCTION_NAME outfile.txt.
2. Retrieve the message from the SQS queue, using the queue URL from the AWS SAM deployment outputs: aws sqs receive-message --queue-url ENTER_YOUR_QUEUE_URL