Error when deploying the lambda with s3 trigger

seeing error when validating template

Error: The CloudFormation template is invalid: S3 error: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.